mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-06 19:45:20 +01:00
update docs1 to latest version
Strange this didn't happen when regenerating all APIs.
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
# DO NOT EDIT !
|
||||
# This file was generated automatically from 'src/mako/Cargo.toml.mako'
|
||||
# This file was generated automatically from 'src/generator/templates/Cargo.toml.mako'
|
||||
# DO NOT EDIT !
|
||||
[package]
|
||||
|
||||
name = "google-docs1"
|
||||
version = "3.1.0+20220301"
|
||||
name = "google-dns2"
|
||||
version = "4.0.1+20220217"
|
||||
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
|
||||
description = "A complete library to interact with Docs (protocol v1)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/docs1"
|
||||
homepage = "https://developers.google.com/docs/"
|
||||
documentation = "https://docs.rs/google-docs1/3.1.0+20220301"
|
||||
description = "A complete library to interact with Dns (protocol v2)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/dns2"
|
||||
homepage = "https://cloud.google.com/dns/docs"
|
||||
documentation = "https://docs.rs/google-dns2/4.0.1+20220217"
|
||||
license = "MIT"
|
||||
keywords = ["docs", "google", "protocol", "web", "api"]
|
||||
keywords = ["dns", "google", "protocol", "web", "api"]
|
||||
autobins = false
|
||||
edition = "2018"
|
||||
|
||||
@@ -22,9 +22,12 @@ mime = "^ 0.2.0"
|
||||
serde = "^ 1.0"
|
||||
serde_json = "^ 1.0"
|
||||
serde_derive = "^ 1.0"
|
||||
yup-oauth2 = "^ 6.6"
|
||||
yup-oauth2 = "^ 7.0"
|
||||
itertools = "^ 0.10"
|
||||
hyper = "^ 0.14"
|
||||
http = "^0.2"
|
||||
tokio = "^1.0"
|
||||
tower-service = "^0.3.1"
|
||||
url = "= 1.7"
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!---
|
||||
DO NOT EDIT !
|
||||
This file was generated automatically from 'src/mako/LICENSE.md.mako'
|
||||
This file was generated automatically from 'src/generator/templates/LICENSE.md.mako'
|
||||
DO NOT EDIT !
|
||||
-->
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -1,20 +1,36 @@
|
||||
<!---
|
||||
DO NOT EDIT !
|
||||
This file was generated automatically from 'src/mako/api/README.md.mako'
|
||||
This file was generated automatically from 'src/generator/templates/api/README.md.mako'
|
||||
DO NOT EDIT !
|
||||
-->
|
||||
The `google-docs1` library allows access to all features of the *Google Docs* service.
|
||||
The `google-dns2` library allows access to all features of the *Google Dns* service.
|
||||
|
||||
This documentation was generated from *Docs* crate version *3.1.0+20220301*, where *20220301* is the exact revision of the *docs:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v3.1.0*.
|
||||
This documentation was generated from *Dns* crate version *4.0.1+20220217*, where *20220217* is the exact revision of the *dns:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v4.0.1*.
|
||||
|
||||
Everything else about the *Docs* *v1* API can be found at the
|
||||
[official documentation site](https://developers.google.com/docs/).
|
||||
Everything else about the *Dns* *v2* API can be found at the
|
||||
[official documentation site](https://cloud.google.com/dns/docs).
|
||||
# Features
|
||||
|
||||
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/Docs) ...
|
||||
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/Dns) ...
|
||||
|
||||
* [documents](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/api::Document)
|
||||
* [*batch update*](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/api::DocumentBatchUpdateCall), [*create*](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/api::DocumentCreateCall) and [*get*](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/api::DocumentGetCall)
|
||||
* [changes](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::Change)
|
||||
* [*create*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ChangeCreateCall), [*get*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ChangeGetCall) and [*list*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ChangeListCall)
|
||||
* [dns keys](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::DnsKey)
|
||||
* [*get*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::DnsKeyGetCall) and [*list*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::DnsKeyListCall)
|
||||
* managed zone operations
|
||||
* [*get*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ManagedZoneOperationGetCall) and [*list*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ManagedZoneOperationListCall)
|
||||
* [managed zones](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ManagedZone)
|
||||
* [*create*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ManagedZoneCreateCall), [*delete*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ManagedZoneDeleteCall), [*get*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ManagedZoneGetCall), [*list*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ManagedZoneListCall), [*patch*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ManagedZonePatchCall) and [*update*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ManagedZoneUpdateCall)
|
||||
* [policies](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::Policy)
|
||||
* [*create*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::PolicyCreateCall), [*delete*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::PolicyDeleteCall), [*get*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::PolicyGetCall), [*list*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::PolicyListCall), [*patch*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::PolicyPatchCall) and [*update*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::PolicyUpdateCall)
|
||||
* [projects](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::Project)
|
||||
* [*get*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ProjectGetCall)
|
||||
* [resource record sets](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResourceRecordSet)
|
||||
* [*create*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResourceRecordSetCreateCall), [*delete*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResourceRecordSetDeleteCall), [*get*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResourceRecordSetGetCall), [*list*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResourceRecordSetListCall) and [*patch*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResourceRecordSetPatchCall)
|
||||
* [response policies](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicy)
|
||||
* [*create*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyCreateCall), [*delete*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyDeleteCall), [*get*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyGetCall), [*list*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyListCall), [*patch*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyPatchCall) and [*update*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyUpdateCall)
|
||||
* [response policy rules](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyRule)
|
||||
* [*create*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyRuleCreateCall), [*delete*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyRuleDeleteCall), [*get*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyRuleGetCall), [*list*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyRuleListCall), [*patch*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyRulePatchCall) and [*update*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/api::ResponsePolicyRuleUpdateCall)
|
||||
|
||||
|
||||
|
||||
@@ -23,17 +39,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r
|
||||
|
||||
The API is structured into the following primary items:
|
||||
|
||||
* **[Hub](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/Docs)**
|
||||
* **[Hub](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/Dns)**
|
||||
* a central object to maintain state and allow accessing all *Activities*
|
||||
* creates [*Method Builders*](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::MethodsBuilder) which in turn
|
||||
allow access to individual [*Call Builders*](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::CallBuilder)
|
||||
* **[Resources](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::Resource)**
|
||||
* creates [*Method Builders*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::MethodsBuilder) which in turn
|
||||
allow access to individual [*Call Builders*](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::CallBuilder)
|
||||
* **[Resources](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::Resource)**
|
||||
* primary types that you can apply *Activities* to
|
||||
* a collection of properties and *Parts*
|
||||
* **[Parts](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::Part)**
|
||||
* **[Parts](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::Part)**
|
||||
* a collection of properties
|
||||
* never directly used in *Activities*
|
||||
* **[Activities](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::CallBuilder)**
|
||||
* **[Activities](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::CallBuilder)**
|
||||
* operations to apply to *Resources*
|
||||
|
||||
All *structures* are marked with applicable traits to further categorize them and ease browsing.
|
||||
@@ -47,9 +63,12 @@ let r = hub.resource().activity(...).doit().await
|
||||
Or specifically ...
|
||||
|
||||
```ignore
|
||||
let r = hub.documents().batch_update(...).doit().await
|
||||
let r = hub.documents().create(...).doit().await
|
||||
let r = hub.documents().get(...).doit().await
|
||||
let r = hub.managed_zones().create(...).doit().await
|
||||
let r = hub.managed_zones().delete(...).doit().await
|
||||
let r = hub.managed_zones().get(...).doit().await
|
||||
let r = hub.managed_zones().list(...).doit().await
|
||||
let r = hub.managed_zones().patch(...).doit().await
|
||||
let r = hub.managed_zones().update(...).doit().await
|
||||
```
|
||||
|
||||
The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
@@ -65,7 +84,7 @@ To use this library, you would put the following lines into your `Cargo.toml` fi
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
google-docs1 = "*"
|
||||
google-dns2 = "*"
|
||||
serde = "^1.0"
|
||||
serde_json = "^1.0"
|
||||
```
|
||||
@@ -75,11 +94,10 @@ serde_json = "^1.0"
|
||||
```Rust
|
||||
extern crate hyper;
|
||||
extern crate hyper_rustls;
|
||||
extern crate google_docs1 as docs1;
|
||||
use docs1::api::BatchUpdateDocumentRequest;
|
||||
use docs1::{Result, Error};
|
||||
extern crate google_dns2 as dns2;
|
||||
use dns2::{Result, Error};
|
||||
use std::default::Default;
|
||||
use docs1::{Docs, oauth2, hyper, hyper_rustls};
|
||||
use dns2::{Dns, oauth2, hyper, hyper_rustls};
|
||||
|
||||
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
// `client_secret`, among other things.
|
||||
@@ -93,16 +111,14 @@ let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
secret,
|
||||
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
).build().await.unwrap();
|
||||
let mut hub = Docs::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
|
||||
// As the method needs a request, you would usually fill it with the desired information
|
||||
// into the respective structure. Some of the parts shown here might not be applicable !
|
||||
// Values shown here are possibly random and not representative !
|
||||
let mut req = BatchUpdateDocumentRequest::default();
|
||||
|
||||
let mut hub = Dns::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
|
||||
// You can configure optional parameters by calling the respective setters at will, and
|
||||
// execute the final call using `doit()`.
|
||||
// Values shown here are possibly random and not representative !
|
||||
let result = hub.documents().batch_update(req, "documentId")
|
||||
let result = hub.managed_zones().list("project", "location")
|
||||
.page_token("no")
|
||||
.max_results(-55)
|
||||
.dns_name("voluptua.")
|
||||
.doit().await;
|
||||
|
||||
match result {
|
||||
@@ -126,17 +142,17 @@ match result {
|
||||
```
|
||||
## Handling Errors
|
||||
|
||||
All errors produced by the system are provided either as [Result](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::Result) enumeration as return value of
|
||||
All errors produced by the system are provided either as [Result](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::Result) enumeration as return value of
|
||||
the doit() methods, or handed as possibly intermediate results to either the
|
||||
[Hub Delegate](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
|
||||
[Hub Delegate](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
|
||||
|
||||
When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
|
||||
makes the system potentially resilient to all kinds of errors.
|
||||
|
||||
## Uploads and Downloads
|
||||
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::Result), should be
|
||||
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::Result), should be
|
||||
read by you to obtain the media.
|
||||
If such a method also supports a [Response Result](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::ResponseResult), it will return that by default.
|
||||
If such a method also supports a [Response Result](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::ResponseResult), it will return that by default.
|
||||
You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
|
||||
this call: `.param("alt", "media")`.
|
||||
|
||||
@@ -146,29 +162,29 @@ Methods supporting uploads can do so using up to 2 different protocols:
|
||||
|
||||
## Customization and Callbacks
|
||||
|
||||
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::Delegate) to the
|
||||
[Method Builder](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::CallBuilder) before making the final `doit()` call.
|
||||
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::Delegate) to the
|
||||
[Method Builder](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::CallBuilder) before making the final `doit()` call.
|
||||
Respective methods will be called to provide progress information, as well as determine whether the system should
|
||||
retry on failure.
|
||||
|
||||
The [delegate trait](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
|
||||
The [delegate trait](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
|
||||
|
||||
## Optional Parts in Server-Requests
|
||||
|
||||
All structures provided by this library are made to be [encodable](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::RequestValue) and
|
||||
[decodable](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
All structures provided by this library are made to be [encodable](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::RequestValue) and
|
||||
[decodable](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
are valid.
|
||||
Most optionals are are considered [Parts](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::Part) which are identifiable by name, which will be sent to
|
||||
Most optionals are are considered [Parts](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::Part) which are identifiable by name, which will be sent to
|
||||
the server to indicate either the set parts of the request or the desired parts in the response.
|
||||
|
||||
## Builder Arguments
|
||||
|
||||
Using [method builders](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
|
||||
Using [method builders](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
|
||||
These will always take a single argument, for which the following statements are true.
|
||||
|
||||
* [PODs][wiki-pod] are handed by copy
|
||||
* strings are passed as `&str`
|
||||
* [request values](https://docs.rs/google-docs1/3.1.0+20220301/google_docs1/client::RequestValue) are moved
|
||||
* [request values](https://docs.rs/google-dns2/4.0.1+20220217/google_dns2/client::RequestValue) are moved
|
||||
|
||||
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
|
||||
|
||||
@@ -177,8 +193,9 @@ Arguments will always be copied or cloned into the builder, to make them indepen
|
||||
[google-go-api]: https://github.com/google/google-api-go-client
|
||||
|
||||
# License
|
||||
The **docs1** library was generated by Sebastian Thiel, and is placed
|
||||
The **dns2** library was generated by Sebastian Thiel, and is placed
|
||||
under the *MIT* license.
|
||||
You can read the full text at the repository's [license file][repo-license].
|
||||
|
||||
[repo-license]: https://github.com/Byron/google-apis-rsblob/main/LICENSE.md
|
||||
|
||||
|
||||
16824
gen/docs1/src/api.rs
16824
gen/docs1/src/api.rs
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
// COPY OF 'src/rust/api/client.rs'
|
||||
// DO NOT EDIT
|
||||
use std::error;
|
||||
use std::error::Error as StdError;
|
||||
use std::fmt::{self, Display};
|
||||
use std::io::{self, Cursor, Read, Seek, SeekFrom, Write};
|
||||
use std::str::FromStr;
|
||||
@@ -9,7 +10,10 @@ use std::time::Duration;
|
||||
|
||||
use itertools::Itertools;
|
||||
|
||||
use hyper::http::Uri;
|
||||
|
||||
use hyper::body::Buf;
|
||||
use hyper::client::connect;
|
||||
use hyper::header::{HeaderMap, AUTHORIZATION, CONTENT_LENGTH, CONTENT_TYPE, USER_AGENT};
|
||||
use hyper::Method;
|
||||
use hyper::StatusCode;
|
||||
@@ -18,6 +22,9 @@ use mime::{Attr, Mime, SubLevel, TopLevel, Value};
|
||||
|
||||
use serde_json as json;
|
||||
|
||||
use tokio::io::{AsyncRead, AsyncWrite};
|
||||
use tower_service;
|
||||
|
||||
const LINE_ENDING: &str = "\r\n";
|
||||
|
||||
pub enum Retry {
|
||||
@@ -566,9 +573,15 @@ impl RangeResponseHeader {
|
||||
}
|
||||
|
||||
/// A utility type to perform a resumable upload from start to end.
|
||||
pub struct ResumableUploadHelper<'a, A: 'a> {
|
||||
pub struct ResumableUploadHelper<'a, A: 'a, S>
|
||||
where
|
||||
S: tower_service::Service<Uri> + Clone + Send + Sync + 'static,
|
||||
S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static,
|
||||
S::Future: Send + Unpin + 'static,
|
||||
S::Error: Into<Box<dyn StdError + Send + Sync>>,
|
||||
{
|
||||
pub client: &'a hyper::client::Client<
|
||||
hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>,
|
||||
S,
|
||||
hyper::body::Body,
|
||||
>,
|
||||
pub delegate: &'a mut dyn Delegate,
|
||||
@@ -582,7 +595,13 @@ pub struct ResumableUploadHelper<'a, A: 'a> {
|
||||
pub content_length: u64,
|
||||
}
|
||||
|
||||
impl<'a, A> ResumableUploadHelper<'a, A> {
|
||||
impl<'a, A, S> ResumableUploadHelper<'a, A, S>
|
||||
where
|
||||
S: tower_service::Service<Uri> + Clone + Send + Sync + 'static,
|
||||
S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static,
|
||||
S::Future: Send + Unpin + 'static,
|
||||
S::Error: Into<Box<dyn StdError + Send + Sync>>,
|
||||
{
|
||||
async fn query_transfer_status(
|
||||
&mut self,
|
||||
) -> std::result::Result<u64, hyper::Result<hyper::Response<hyper::body::Body>>> {
|
||||
@@ -697,14 +716,11 @@ impl<'a, A> ResumableUploadHelper<'a, A> {
|
||||
}
|
||||
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let res_body = match hyper::body::to_bytes(res_body).await {
|
||||
Ok(res_body) => res_body.into_iter().collect(),
|
||||
Err(err) => return Some(Err(err)),
|
||||
};
|
||||
let res_body_string: String = String::from_utf8(res_body).unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
// DO NOT EDIT !
|
||||
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
|
||||
// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
//! This documentation was generated from *Docs* crate version *3.1.0+20220301*, where *20220301* is the exact revision of the *docs:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v3.1.0*.
|
||||
//! This documentation was generated from *Dns* crate version *4.0.1+20220217*, where *20220217* is the exact revision of the *dns:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v4.0.1*.
|
||||
//!
|
||||
//! Everything else about the *Docs* *v1* API can be found at the
|
||||
//! [official documentation site](https://developers.google.com/docs/).
|
||||
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/docs1).
|
||||
//! Everything else about the *Dns* *v2* API can be found at the
|
||||
//! [official documentation site](https://cloud.google.com/dns/docs).
|
||||
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/dns2).
|
||||
//! # Features
|
||||
//!
|
||||
//! Handle the following *Resources* with ease from the central [hub](Docs) ...
|
||||
//! Handle the following *Resources* with ease from the central [hub](Dns) ...
|
||||
//!
|
||||
//! * [documents](api::Document)
|
||||
//! * [*batch update*](api::DocumentBatchUpdateCall), [*create*](api::DocumentCreateCall) and [*get*](api::DocumentGetCall)
|
||||
//! * [changes](api::Change)
|
||||
//! * [*create*](api::ChangeCreateCall), [*get*](api::ChangeGetCall) and [*list*](api::ChangeListCall)
|
||||
//! * [dns keys](api::DnsKey)
|
||||
//! * [*get*](api::DnsKeyGetCall) and [*list*](api::DnsKeyListCall)
|
||||
//! * managed zone operations
|
||||
//! * [*get*](api::ManagedZoneOperationGetCall) and [*list*](api::ManagedZoneOperationListCall)
|
||||
//! * [managed zones](api::ManagedZone)
|
||||
//! * [*create*](api::ManagedZoneCreateCall), [*delete*](api::ManagedZoneDeleteCall), [*get*](api::ManagedZoneGetCall), [*list*](api::ManagedZoneListCall), [*patch*](api::ManagedZonePatchCall) and [*update*](api::ManagedZoneUpdateCall)
|
||||
//! * [policies](api::Policy)
|
||||
//! * [*create*](api::PolicyCreateCall), [*delete*](api::PolicyDeleteCall), [*get*](api::PolicyGetCall), [*list*](api::PolicyListCall), [*patch*](api::PolicyPatchCall) and [*update*](api::PolicyUpdateCall)
|
||||
//! * [projects](api::Project)
|
||||
//! * [*get*](api::ProjectGetCall)
|
||||
//! * [resource record sets](api::ResourceRecordSet)
|
||||
//! * [*create*](api::ResourceRecordSetCreateCall), [*delete*](api::ResourceRecordSetDeleteCall), [*get*](api::ResourceRecordSetGetCall), [*list*](api::ResourceRecordSetListCall) and [*patch*](api::ResourceRecordSetPatchCall)
|
||||
//! * [response policies](api::ResponsePolicy)
|
||||
//! * [*create*](api::ResponsePolicyCreateCall), [*delete*](api::ResponsePolicyDeleteCall), [*get*](api::ResponsePolicyGetCall), [*list*](api::ResponsePolicyListCall), [*patch*](api::ResponsePolicyPatchCall) and [*update*](api::ResponsePolicyUpdateCall)
|
||||
//! * [response policy rules](api::ResponsePolicyRule)
|
||||
//! * [*create*](api::ResponsePolicyRuleCreateCall), [*delete*](api::ResponsePolicyRuleDeleteCall), [*get*](api::ResponsePolicyRuleGetCall), [*list*](api::ResponsePolicyRuleListCall), [*patch*](api::ResponsePolicyRulePatchCall) and [*update*](api::ResponsePolicyRuleUpdateCall)
|
||||
//!
|
||||
//!
|
||||
//!
|
||||
@@ -23,7 +39,7 @@
|
||||
//!
|
||||
//! The API is structured into the following primary items:
|
||||
//!
|
||||
//! * **[Hub](Docs)**
|
||||
//! * **[Hub](Dns)**
|
||||
//! * a central object to maintain state and allow accessing all *Activities*
|
||||
//! * creates [*Method Builders*](client::MethodsBuilder) which in turn
|
||||
//! allow access to individual [*Call Builders*](client::CallBuilder)
|
||||
@@ -47,9 +63,12 @@
|
||||
//! Or specifically ...
|
||||
//!
|
||||
//! ```ignore
|
||||
//! let r = hub.documents().batch_update(...).doit().await
|
||||
//! let r = hub.documents().create(...).doit().await
|
||||
//! let r = hub.documents().get(...).doit().await
|
||||
//! let r = hub.managed_zones().create(...).doit().await
|
||||
//! let r = hub.managed_zones().delete(...).doit().await
|
||||
//! let r = hub.managed_zones().get(...).doit().await
|
||||
//! let r = hub.managed_zones().list(...).doit().await
|
||||
//! let r = hub.managed_zones().patch(...).doit().await
|
||||
//! let r = hub.managed_zones().update(...).doit().await
|
||||
//! ```
|
||||
//!
|
||||
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
@@ -65,7 +84,7 @@
|
||||
//!
|
||||
//! ```toml
|
||||
//! [dependencies]
|
||||
//! google-docs1 = "*"
|
||||
//! google-dns2 = "*"
|
||||
//! serde = "^1.0"
|
||||
//! serde_json = "^1.0"
|
||||
//! ```
|
||||
@@ -75,12 +94,11 @@
|
||||
//! ```test_harness,no_run
|
||||
//! extern crate hyper;
|
||||
//! extern crate hyper_rustls;
|
||||
//! extern crate google_docs1 as docs1;
|
||||
//! use docs1::api::BatchUpdateDocumentRequest;
|
||||
//! use docs1::{Result, Error};
|
||||
//! extern crate google_dns2 as dns2;
|
||||
//! use dns2::{Result, Error};
|
||||
//! # async fn dox() {
|
||||
//! use std::default::Default;
|
||||
//! use docs1::{Docs, oauth2, hyper, hyper_rustls};
|
||||
//! use dns2::{Dns, oauth2, hyper, hyper_rustls};
|
||||
//!
|
||||
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
//! // `client_secret`, among other things.
|
||||
@@ -94,16 +112,14 @@
|
||||
//! secret,
|
||||
//! oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
//! ).build().await.unwrap();
|
||||
//! let mut hub = Docs::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
|
||||
//! // As the method needs a request, you would usually fill it with the desired information
|
||||
//! // into the respective structure. Some of the parts shown here might not be applicable !
|
||||
//! // Values shown here are possibly random and not representative !
|
||||
//! let mut req = BatchUpdateDocumentRequest::default();
|
||||
//!
|
||||
//! let mut hub = Dns::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
|
||||
//! // You can configure optional parameters by calling the respective setters at will, and
|
||||
//! // execute the final call using `doit()`.
|
||||
//! // Values shown here are possibly random and not representative !
|
||||
//! let result = hub.documents().batch_update(req, "documentId")
|
||||
//! let result = hub.managed_zones().list("project", "location")
|
||||
//! .page_token("sed")
|
||||
//! .max_results(-2)
|
||||
//! .dns_name("takimata")
|
||||
//! .doit().await;
|
||||
//!
|
||||
//! match result {
|
||||
@@ -186,7 +202,7 @@
|
||||
#![allow(unused_imports, unused_mut, dead_code)]
|
||||
|
||||
// DO NOT EDIT !
|
||||
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
|
||||
// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
#[macro_use]
|
||||
@@ -206,5 +222,5 @@ pub mod api;
|
||||
pub mod client;
|
||||
|
||||
// Re-export the hub type and some basic client structs
|
||||
pub use api::Docs;
|
||||
pub use api::Dns;
|
||||
pub use client::{Result, Error, Delegate};
|
||||
|
||||
Reference in New Issue
Block a user