regenerate all APIs and CLIs (#357)

This commit is contained in:
Sebastian Thiel
2022-09-14 08:40:12 +08:00
parent 0e011fcbe2
commit 7abe6a3de2
3505 changed files with 247010 additions and 176785 deletions

View File

@@ -1,15 +1,15 @@
# 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-transcoder1"
version = "3.1.0+20220201"
version = "4.0.1+20220201"
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
description = "A complete library to interact with Transcoder (protocol v1)"
repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/transcoder1"
homepage = "https://cloud.google.com/transcoder/docs/"
documentation = "https://docs.rs/google-transcoder1/3.1.0+20220201"
documentation = "https://docs.rs/google-transcoder1/4.0.1+20220201"
license = "MIT"
keywords = ["transcoder", "google", "protocol", "web", "api"]
autobins = false
@@ -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"

View File

@@ -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)

View File

@@ -1,20 +1,20 @@
<!---
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-transcoder1` library allows access to all features of the *Google Transcoder* service.
This documentation was generated from *Transcoder* crate version *3.1.0+20220201*, where *20220201* is the exact revision of the *transcoder:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v3.1.0*.
This documentation was generated from *Transcoder* crate version *4.0.1+20220201*, where *20220201* is the exact revision of the *transcoder:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v4.0.1*.
Everything else about the *Transcoder* *v1* API can be found at the
[official documentation site](https://cloud.google.com/transcoder/docs/).
# Features
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/Transcoder) ...
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/Transcoder) ...
* projects
* [*locations job templates create*](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/api::ProjectLocationJobTemplateCreateCall), [*locations job templates delete*](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/api::ProjectLocationJobTemplateDeleteCall), [*locations job templates get*](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/api::ProjectLocationJobTemplateGetCall), [*locations job templates list*](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/api::ProjectLocationJobTemplateListCall), [*locations jobs create*](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/api::ProjectLocationJobCreateCall), [*locations jobs delete*](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/api::ProjectLocationJobDeleteCall), [*locations jobs get*](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/api::ProjectLocationJobGetCall) and [*locations jobs list*](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/api::ProjectLocationJobListCall)
* [*locations job templates create*](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/api::ProjectLocationJobTemplateCreateCall), [*locations job templates delete*](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/api::ProjectLocationJobTemplateDeleteCall), [*locations job templates get*](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/api::ProjectLocationJobTemplateGetCall), [*locations job templates list*](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/api::ProjectLocationJobTemplateListCall), [*locations jobs create*](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/api::ProjectLocationJobCreateCall), [*locations jobs delete*](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/api::ProjectLocationJobDeleteCall), [*locations jobs get*](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/api::ProjectLocationJobGetCall) and [*locations jobs list*](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/api::ProjectLocationJobListCall)
@@ -23,17 +23,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-transcoder1/3.1.0+20220201/google_transcoder1/Transcoder)**
* **[Hub](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/Transcoder)**
* a central object to maintain state and allow accessing all *Activities*
* creates [*Method Builders*](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/client::MethodsBuilder) which in turn
allow access to individual [*Call Builders*](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/client::CallBuilder)
* **[Resources](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/client::Resource)**
* creates [*Method Builders*](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/client::MethodsBuilder) which in turn
allow access to individual [*Call Builders*](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/client::CallBuilder)
* **[Resources](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/client::Resource)**
* primary types that you can apply *Activities* to
* a collection of properties and *Parts*
* **[Parts](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/client::Part)**
* **[Parts](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/client::Part)**
* a collection of properties
* never directly used in *Activities*
* **[Activities](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/client::CallBuilder)**
* **[Activities](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/client::CallBuilder)**
* operations to apply to *Resources*
All *structures* are marked with applicable traits to further categorize them and ease browsing.
@@ -92,7 +92,7 @@ let auth = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().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 !
@@ -125,17 +125,17 @@ match result {
```
## Handling Errors
All errors produced by the system are provided either as [Result](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/client::Result) enumeration as return value of
All errors produced by the system are provided either as [Result](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/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-transcoder1/3.1.0+20220201/google_transcoder1/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
[Hub Delegate](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/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-transcoder1/3.1.0+20220201/google_transcoder1/client::Result), should be
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/client::Result), should be
read by you to obtain the media.
If such a method also supports a [Response Result](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/client::ResponseResult), it will return that by default.
If such a method also supports a [Response Result](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/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")`.
@@ -145,29 +145,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-transcoder1/3.1.0+20220201/google_transcoder1/client::Delegate) to the
[Method Builder](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/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-transcoder1/4.0.1+20220201/google_transcoder1/client::Delegate) to the
[Method Builder](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/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-transcoder1/3.1.0+20220201/google_transcoder1/client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
The [delegate trait](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/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-transcoder1/3.1.0+20220201/google_transcoder1/client::RequestValue) and
[decodable](https://docs.rs/google-transcoder1/3.1.0+20220201/google_transcoder1/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-transcoder1/4.0.1+20220201/google_transcoder1/client::RequestValue) and
[decodable](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/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-transcoder1/3.1.0+20220201/google_transcoder1/client::Part) which are identifiable by name, which will be sent to
Most optionals are are considered [Parts](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/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-transcoder1/3.1.0+20220201/google_transcoder1/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
Using [method builders](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/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-transcoder1/3.1.0+20220201/google_transcoder1/client::RequestValue) are moved
* [request values](https://docs.rs/google-transcoder1/4.0.1+20220201/google_transcoder1/client::RequestValue) are moved
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
@@ -181,3 +181,4 @@ 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

View File

@@ -2,12 +2,17 @@ use std::collections::HashMap;
use std::cell::RefCell;
use std::default::Default;
use std::collections::BTreeMap;
use std::error::Error as StdError;
use serde_json as json;
use std::io;
use std::fs;
use std::mem;
use std::thread::sleep;
use http::Uri;
use hyper::client::connect;
use tokio::io::{AsyncRead, AsyncWrite};
use tower_service;
use crate::client;
// ##############
@@ -71,7 +76,7 @@ impl Default for Scope {
/// secret,
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// ).build().await.unwrap();
/// let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
/// let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().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 !
@@ -103,34 +108,34 @@ impl Default for Scope {
/// # }
/// ```
#[derive(Clone)]
pub struct Transcoder<> {
pub client: hyper::Client<hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>, hyper::body::Body>,
pub auth: oauth2::authenticator::Authenticator<hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>>,
pub struct Transcoder<S> {
pub client: hyper::Client<S, hyper::body::Body>,
pub auth: oauth2::authenticator::Authenticator<S>,
_user_agent: String,
_base_url: String,
_root_url: String,
}
impl<'a, > client::Hub for Transcoder<> {}
impl<'a, S> client::Hub for Transcoder<S> {}
impl<'a, > Transcoder<> {
impl<'a, S> Transcoder<S> {
pub fn new(client: hyper::Client<hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>, hyper::body::Body>, authenticator: oauth2::authenticator::Authenticator<hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>>) -> Transcoder<> {
pub fn new(client: hyper::Client<S, hyper::body::Body>, authenticator: oauth2::authenticator::Authenticator<S>) -> Transcoder<S> {
Transcoder {
client,
auth: authenticator,
_user_agent: "google-api-rust-client/3.1.0".to_string(),
_user_agent: "google-api-rust-client/4.0.1".to_string(),
_base_url: "https://transcoder.googleapis.com/".to_string(),
_root_url: "https://transcoder.googleapis.com/".to_string(),
}
}
pub fn projects(&'a self) -> ProjectMethods<'a> {
pub fn projects(&'a self) -> ProjectMethods<'a, S> {
ProjectMethods { hub: &self }
}
/// Set the user-agent header field to use in all requests to the server.
/// It defaults to `google-api-rust-client/3.1.0`.
/// It defaults to `google-api-rust-client/4.0.1`.
///
/// Returns the previously set user-agent.
pub fn user_agent(&mut self, agent_name: String) -> String {
@@ -1108,22 +1113,22 @@ impl client::Part for Vp9CodecSettings {}
/// secret,
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// ).build().await.unwrap();
/// let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
/// let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
/// // like `locations_job_templates_create(...)`, `locations_job_templates_delete(...)`, `locations_job_templates_get(...)`, `locations_job_templates_list(...)`, `locations_jobs_create(...)`, `locations_jobs_delete(...)`, `locations_jobs_get(...)` and `locations_jobs_list(...)`
/// // to build up your call.
/// let rb = hub.projects();
/// # }
/// ```
pub struct ProjectMethods<'a>
where {
pub struct ProjectMethods<'a, S>
where S: 'a {
hub: &'a Transcoder<>,
hub: &'a Transcoder<S>,
}
impl<'a> client::MethodsBuilder for ProjectMethods<'a> {}
impl<'a, S> client::MethodsBuilder for ProjectMethods<'a, S> {}
impl<'a> ProjectMethods<'a> {
impl<'a, S> ProjectMethods<'a, S> {
/// Create a builder to help you perform the following task:
///
@@ -1133,7 +1138,7 @@ impl<'a> ProjectMethods<'a> {
///
/// * `request` - No description provided.
/// * `parent` - Required. The parent location to create this job template. Format: `projects/{project}/locations/{location}`
pub fn locations_job_templates_create(&self, request: JobTemplate, parent: &str) -> ProjectLocationJobTemplateCreateCall<'a> {
pub fn locations_job_templates_create(&self, request: JobTemplate, parent: &str) -> ProjectLocationJobTemplateCreateCall<'a, S> {
ProjectLocationJobTemplateCreateCall {
hub: self.hub,
_request: request,
@@ -1152,7 +1157,7 @@ impl<'a> ProjectMethods<'a> {
/// # Arguments
///
/// * `name` - Required. The name of the job template to delete. `projects/{project}/locations/{location}/jobTemplates/{job_template}`
pub fn locations_job_templates_delete(&self, name: &str) -> ProjectLocationJobTemplateDeleteCall<'a> {
pub fn locations_job_templates_delete(&self, name: &str) -> ProjectLocationJobTemplateDeleteCall<'a, S> {
ProjectLocationJobTemplateDeleteCall {
hub: self.hub,
_name: name.to_string(),
@@ -1170,7 +1175,7 @@ impl<'a> ProjectMethods<'a> {
/// # Arguments
///
/// * `name` - Required. The name of the job template to retrieve. Format: `projects/{project}/locations/{location}/jobTemplates/{job_template}`
pub fn locations_job_templates_get(&self, name: &str) -> ProjectLocationJobTemplateGetCall<'a> {
pub fn locations_job_templates_get(&self, name: &str) -> ProjectLocationJobTemplateGetCall<'a, S> {
ProjectLocationJobTemplateGetCall {
hub: self.hub,
_name: name.to_string(),
@@ -1187,7 +1192,7 @@ impl<'a> ProjectMethods<'a> {
/// # Arguments
///
/// * `parent` - Required. The parent location from which to retrieve the collection of job templates. Format: `projects/{project}/locations/{location}`
pub fn locations_job_templates_list(&self, parent: &str) -> ProjectLocationJobTemplateListCall<'a> {
pub fn locations_job_templates_list(&self, parent: &str) -> ProjectLocationJobTemplateListCall<'a, S> {
ProjectLocationJobTemplateListCall {
hub: self.hub,
_parent: parent.to_string(),
@@ -1209,7 +1214,7 @@ impl<'a> ProjectMethods<'a> {
///
/// * `request` - No description provided.
/// * `parent` - Required. The parent location to create and process this job. Format: `projects/{project}/locations/{location}`
pub fn locations_jobs_create(&self, request: Job, parent: &str) -> ProjectLocationJobCreateCall<'a> {
pub fn locations_jobs_create(&self, request: Job, parent: &str) -> ProjectLocationJobCreateCall<'a, S> {
ProjectLocationJobCreateCall {
hub: self.hub,
_request: request,
@@ -1227,7 +1232,7 @@ impl<'a> ProjectMethods<'a> {
/// # Arguments
///
/// * `name` - Required. The name of the job to delete. Format: `projects/{project}/locations/{location}/jobs/{job}`
pub fn locations_jobs_delete(&self, name: &str) -> ProjectLocationJobDeleteCall<'a> {
pub fn locations_jobs_delete(&self, name: &str) -> ProjectLocationJobDeleteCall<'a, S> {
ProjectLocationJobDeleteCall {
hub: self.hub,
_name: name.to_string(),
@@ -1245,7 +1250,7 @@ impl<'a> ProjectMethods<'a> {
/// # Arguments
///
/// * `name` - Required. The name of the job to retrieve. Format: `projects/{project}/locations/{location}/jobs/{job}`
pub fn locations_jobs_get(&self, name: &str) -> ProjectLocationJobGetCall<'a> {
pub fn locations_jobs_get(&self, name: &str) -> ProjectLocationJobGetCall<'a, S> {
ProjectLocationJobGetCall {
hub: self.hub,
_name: name.to_string(),
@@ -1262,7 +1267,7 @@ impl<'a> ProjectMethods<'a> {
/// # Arguments
///
/// * `parent` - Required. Format: `projects/{project}/locations/{location}`
pub fn locations_jobs_list(&self, parent: &str) -> ProjectLocationJobListCall<'a> {
pub fn locations_jobs_list(&self, parent: &str) -> ProjectLocationJobListCall<'a, S> {
ProjectLocationJobListCall {
hub: self.hub,
_parent: parent.to_string(),
@@ -1308,7 +1313,7 @@ impl<'a> ProjectMethods<'a> {
/// # secret,
/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// # ).build().await.unwrap();
/// # let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
/// # let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().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 !
@@ -1322,10 +1327,10 @@ impl<'a> ProjectMethods<'a> {
/// .doit().await;
/// # }
/// ```
pub struct ProjectLocationJobTemplateCreateCall<'a>
where {
pub struct ProjectLocationJobTemplateCreateCall<'a, S>
where S: 'a {
hub: &'a Transcoder<>,
hub: &'a Transcoder<S>,
_request: JobTemplate,
_parent: String,
_job_template_id: Option<String>,
@@ -1334,9 +1339,15 @@ pub struct ProjectLocationJobTemplateCreateCall<'a>
_scopes: BTreeMap<String, ()>
}
impl<'a> client::CallBuilder for ProjectLocationJobTemplateCreateCall<'a> {}
impl<'a, S> client::CallBuilder for ProjectLocationJobTemplateCreateCall<'a, S> {}
impl<'a> ProjectLocationJobTemplateCreateCall<'a> {
impl<'a, S> ProjectLocationJobTemplateCreateCall<'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>>,
{
/// Perform the operation you have build so far.
@@ -1499,7 +1510,7 @@ impl<'a> ProjectLocationJobTemplateCreateCall<'a> {
///
/// Even though the property as already been set when instantiating this call,
/// we provide this method for API completeness.
pub fn request(mut self, new_value: JobTemplate) -> ProjectLocationJobTemplateCreateCall<'a> {
pub fn request(mut self, new_value: JobTemplate) -> ProjectLocationJobTemplateCreateCall<'a, S> {
self._request = new_value;
self
}
@@ -1509,14 +1520,14 @@ impl<'a> ProjectLocationJobTemplateCreateCall<'a> {
///
/// Even though the property as already been set when instantiating this call,
/// we provide this method for API completeness.
pub fn parent(mut self, new_value: &str) -> ProjectLocationJobTemplateCreateCall<'a> {
pub fn parent(mut self, new_value: &str) -> ProjectLocationJobTemplateCreateCall<'a, S> {
self._parent = new_value.to_string();
self
}
/// Required. The ID to use for the job template, which will become the final component of the job template's resource name. This value should be 4-63 characters, and valid characters must match the regular expression `a-zA-Z*`.
///
/// Sets the *job template id* query property to the given value.
pub fn job_template_id(mut self, new_value: &str) -> ProjectLocationJobTemplateCreateCall<'a> {
pub fn job_template_id(mut self, new_value: &str) -> ProjectLocationJobTemplateCreateCall<'a, S> {
self._job_template_id = Some(new_value.to_string());
self
}
@@ -1526,7 +1537,7 @@ impl<'a> ProjectLocationJobTemplateCreateCall<'a> {
/// It should be used to handle progress information, and to implement a certain level of resilience.
///
/// Sets the *delegate* property to the given value.
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobTemplateCreateCall<'a> {
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobTemplateCreateCall<'a, S> {
self._delegate = Some(new_value);
self
}
@@ -1551,7 +1562,7 @@ impl<'a> ProjectLocationJobTemplateCreateCall<'a> {
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobTemplateCreateCall<'a>
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobTemplateCreateCall<'a, S>
where T: AsRef<str> {
self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string());
self
@@ -1571,9 +1582,9 @@ impl<'a> ProjectLocationJobTemplateCreateCall<'a> {
/// Usually there is more than one suitable scope to authorize an operation, some of which may
/// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
/// sufficient, a read-write scope will do as well.
pub fn add_scope<T, S>(mut self, scope: T) -> ProjectLocationJobTemplateCreateCall<'a>
where T: Into<Option<S>>,
S: AsRef<str> {
pub fn add_scope<T, St>(mut self, scope: T) -> ProjectLocationJobTemplateCreateCall<'a, S>
where T: Into<Option<St>>,
St: AsRef<str> {
match scope.into() {
Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()),
None => None,
@@ -1605,7 +1616,7 @@ impl<'a> ProjectLocationJobTemplateCreateCall<'a> {
/// # secret,
/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// # ).build().await.unwrap();
/// # let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
/// # let mut hub = Transcoder::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 !
@@ -1614,10 +1625,10 @@ impl<'a> ProjectLocationJobTemplateCreateCall<'a> {
/// .doit().await;
/// # }
/// ```
pub struct ProjectLocationJobTemplateDeleteCall<'a>
where {
pub struct ProjectLocationJobTemplateDeleteCall<'a, S>
where S: 'a {
hub: &'a Transcoder<>,
hub: &'a Transcoder<S>,
_name: String,
_allow_missing: Option<bool>,
_delegate: Option<&'a mut dyn client::Delegate>,
@@ -1625,9 +1636,15 @@ pub struct ProjectLocationJobTemplateDeleteCall<'a>
_scopes: BTreeMap<String, ()>
}
impl<'a> client::CallBuilder for ProjectLocationJobTemplateDeleteCall<'a> {}
impl<'a, S> client::CallBuilder for ProjectLocationJobTemplateDeleteCall<'a, S> {}
impl<'a> ProjectLocationJobTemplateDeleteCall<'a> {
impl<'a, S> ProjectLocationJobTemplateDeleteCall<'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>>,
{
/// Perform the operation you have build so far.
@@ -1777,14 +1794,14 @@ impl<'a> ProjectLocationJobTemplateDeleteCall<'a> {
///
/// Even though the property as already been set when instantiating this call,
/// we provide this method for API completeness.
pub fn name(mut self, new_value: &str) -> ProjectLocationJobTemplateDeleteCall<'a> {
pub fn name(mut self, new_value: &str) -> ProjectLocationJobTemplateDeleteCall<'a, S> {
self._name = new_value.to_string();
self
}
/// If set to true, and the job template is not found, the request will succeed but no action will be taken on the server.
///
/// Sets the *allow missing* query property to the given value.
pub fn allow_missing(mut self, new_value: bool) -> ProjectLocationJobTemplateDeleteCall<'a> {
pub fn allow_missing(mut self, new_value: bool) -> ProjectLocationJobTemplateDeleteCall<'a, S> {
self._allow_missing = Some(new_value);
self
}
@@ -1794,7 +1811,7 @@ impl<'a> ProjectLocationJobTemplateDeleteCall<'a> {
/// It should be used to handle progress information, and to implement a certain level of resilience.
///
/// Sets the *delegate* property to the given value.
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobTemplateDeleteCall<'a> {
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobTemplateDeleteCall<'a, S> {
self._delegate = Some(new_value);
self
}
@@ -1819,7 +1836,7 @@ impl<'a> ProjectLocationJobTemplateDeleteCall<'a> {
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobTemplateDeleteCall<'a>
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobTemplateDeleteCall<'a, S>
where T: AsRef<str> {
self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string());
self
@@ -1839,9 +1856,9 @@ impl<'a> ProjectLocationJobTemplateDeleteCall<'a> {
/// Usually there is more than one suitable scope to authorize an operation, some of which may
/// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
/// sufficient, a read-write scope will do as well.
pub fn add_scope<T, S>(mut self, scope: T) -> ProjectLocationJobTemplateDeleteCall<'a>
where T: Into<Option<S>>,
S: AsRef<str> {
pub fn add_scope<T, St>(mut self, scope: T) -> ProjectLocationJobTemplateDeleteCall<'a, S>
where T: Into<Option<St>>,
St: AsRef<str> {
match scope.into() {
Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()),
None => None,
@@ -1873,7 +1890,7 @@ impl<'a> ProjectLocationJobTemplateDeleteCall<'a> {
/// # secret,
/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// # ).build().await.unwrap();
/// # let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
/// # let mut hub = Transcoder::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 !
@@ -1881,19 +1898,25 @@ impl<'a> ProjectLocationJobTemplateDeleteCall<'a> {
/// .doit().await;
/// # }
/// ```
pub struct ProjectLocationJobTemplateGetCall<'a>
where {
pub struct ProjectLocationJobTemplateGetCall<'a, S>
where S: 'a {
hub: &'a Transcoder<>,
hub: &'a Transcoder<S>,
_name: String,
_delegate: Option<&'a mut dyn client::Delegate>,
_additional_params: HashMap<String, String>,
_scopes: BTreeMap<String, ()>
}
impl<'a> client::CallBuilder for ProjectLocationJobTemplateGetCall<'a> {}
impl<'a, S> client::CallBuilder for ProjectLocationJobTemplateGetCall<'a, S> {}
impl<'a> ProjectLocationJobTemplateGetCall<'a> {
impl<'a, S> ProjectLocationJobTemplateGetCall<'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>>,
{
/// Perform the operation you have build so far.
@@ -2040,7 +2063,7 @@ impl<'a> ProjectLocationJobTemplateGetCall<'a> {
///
/// Even though the property as already been set when instantiating this call,
/// we provide this method for API completeness.
pub fn name(mut self, new_value: &str) -> ProjectLocationJobTemplateGetCall<'a> {
pub fn name(mut self, new_value: &str) -> ProjectLocationJobTemplateGetCall<'a, S> {
self._name = new_value.to_string();
self
}
@@ -2050,7 +2073,7 @@ impl<'a> ProjectLocationJobTemplateGetCall<'a> {
/// It should be used to handle progress information, and to implement a certain level of resilience.
///
/// Sets the *delegate* property to the given value.
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobTemplateGetCall<'a> {
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobTemplateGetCall<'a, S> {
self._delegate = Some(new_value);
self
}
@@ -2075,7 +2098,7 @@ impl<'a> ProjectLocationJobTemplateGetCall<'a> {
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobTemplateGetCall<'a>
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobTemplateGetCall<'a, S>
where T: AsRef<str> {
self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string());
self
@@ -2095,9 +2118,9 @@ impl<'a> ProjectLocationJobTemplateGetCall<'a> {
/// Usually there is more than one suitable scope to authorize an operation, some of which may
/// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
/// sufficient, a read-write scope will do as well.
pub fn add_scope<T, S>(mut self, scope: T) -> ProjectLocationJobTemplateGetCall<'a>
where T: Into<Option<S>>,
S: AsRef<str> {
pub fn add_scope<T, St>(mut self, scope: T) -> ProjectLocationJobTemplateGetCall<'a, S>
where T: Into<Option<St>>,
St: AsRef<str> {
match scope.into() {
Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()),
None => None,
@@ -2129,7 +2152,7 @@ impl<'a> ProjectLocationJobTemplateGetCall<'a> {
/// # secret,
/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// # ).build().await.unwrap();
/// # let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
/// # let mut hub = Transcoder::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 !
@@ -2141,10 +2164,10 @@ impl<'a> ProjectLocationJobTemplateGetCall<'a> {
/// .doit().await;
/// # }
/// ```
pub struct ProjectLocationJobTemplateListCall<'a>
where {
pub struct ProjectLocationJobTemplateListCall<'a, S>
where S: 'a {
hub: &'a Transcoder<>,
hub: &'a Transcoder<S>,
_parent: String,
_page_token: Option<String>,
_page_size: Option<i32>,
@@ -2155,9 +2178,15 @@ pub struct ProjectLocationJobTemplateListCall<'a>
_scopes: BTreeMap<String, ()>
}
impl<'a> client::CallBuilder for ProjectLocationJobTemplateListCall<'a> {}
impl<'a, S> client::CallBuilder for ProjectLocationJobTemplateListCall<'a, S> {}
impl<'a> ProjectLocationJobTemplateListCall<'a> {
impl<'a, S> ProjectLocationJobTemplateListCall<'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>>,
{
/// Perform the operation you have build so far.
@@ -2316,35 +2345,35 @@ impl<'a> ProjectLocationJobTemplateListCall<'a> {
///
/// Even though the property as already been set when instantiating this call,
/// we provide this method for API completeness.
pub fn parent(mut self, new_value: &str) -> ProjectLocationJobTemplateListCall<'a> {
pub fn parent(mut self, new_value: &str) -> ProjectLocationJobTemplateListCall<'a, S> {
self._parent = new_value.to_string();
self
}
/// The `next_page_token` value returned from a previous List request, if any.
///
/// Sets the *page token* query property to the given value.
pub fn page_token(mut self, new_value: &str) -> ProjectLocationJobTemplateListCall<'a> {
pub fn page_token(mut self, new_value: &str) -> ProjectLocationJobTemplateListCall<'a, S> {
self._page_token = Some(new_value.to_string());
self
}
/// The maximum number of items to return.
///
/// Sets the *page size* query property to the given value.
pub fn page_size(mut self, new_value: i32) -> ProjectLocationJobTemplateListCall<'a> {
pub fn page_size(mut self, new_value: i32) -> ProjectLocationJobTemplateListCall<'a, S> {
self._page_size = Some(new_value);
self
}
/// One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.
///
/// Sets the *order by* query property to the given value.
pub fn order_by(mut self, new_value: &str) -> ProjectLocationJobTemplateListCall<'a> {
pub fn order_by(mut self, new_value: &str) -> ProjectLocationJobTemplateListCall<'a, S> {
self._order_by = Some(new_value.to_string());
self
}
/// The filter expression, following the syntax outlined in https://google.aip.dev/160.
///
/// Sets the *filter* query property to the given value.
pub fn filter(mut self, new_value: &str) -> ProjectLocationJobTemplateListCall<'a> {
pub fn filter(mut self, new_value: &str) -> ProjectLocationJobTemplateListCall<'a, S> {
self._filter = Some(new_value.to_string());
self
}
@@ -2354,7 +2383,7 @@ impl<'a> ProjectLocationJobTemplateListCall<'a> {
/// It should be used to handle progress information, and to implement a certain level of resilience.
///
/// Sets the *delegate* property to the given value.
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobTemplateListCall<'a> {
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobTemplateListCall<'a, S> {
self._delegate = Some(new_value);
self
}
@@ -2379,7 +2408,7 @@ impl<'a> ProjectLocationJobTemplateListCall<'a> {
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobTemplateListCall<'a>
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobTemplateListCall<'a, S>
where T: AsRef<str> {
self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string());
self
@@ -2399,9 +2428,9 @@ impl<'a> ProjectLocationJobTemplateListCall<'a> {
/// Usually there is more than one suitable scope to authorize an operation, some of which may
/// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
/// sufficient, a read-write scope will do as well.
pub fn add_scope<T, S>(mut self, scope: T) -> ProjectLocationJobTemplateListCall<'a>
where T: Into<Option<S>>,
S: AsRef<str> {
pub fn add_scope<T, St>(mut self, scope: T) -> ProjectLocationJobTemplateListCall<'a, S>
where T: Into<Option<St>>,
St: AsRef<str> {
match scope.into() {
Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()),
None => None,
@@ -2434,7 +2463,7 @@ impl<'a> ProjectLocationJobTemplateListCall<'a> {
/// # secret,
/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// # ).build().await.unwrap();
/// # let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
/// # let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().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 !
@@ -2447,10 +2476,10 @@ impl<'a> ProjectLocationJobTemplateListCall<'a> {
/// .doit().await;
/// # }
/// ```
pub struct ProjectLocationJobCreateCall<'a>
where {
pub struct ProjectLocationJobCreateCall<'a, S>
where S: 'a {
hub: &'a Transcoder<>,
hub: &'a Transcoder<S>,
_request: Job,
_parent: String,
_delegate: Option<&'a mut dyn client::Delegate>,
@@ -2458,9 +2487,15 @@ pub struct ProjectLocationJobCreateCall<'a>
_scopes: BTreeMap<String, ()>
}
impl<'a> client::CallBuilder for ProjectLocationJobCreateCall<'a> {}
impl<'a, S> client::CallBuilder for ProjectLocationJobCreateCall<'a, S> {}
impl<'a> ProjectLocationJobCreateCall<'a> {
impl<'a, S> ProjectLocationJobCreateCall<'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>>,
{
/// Perform the operation you have build so far.
@@ -2620,7 +2655,7 @@ impl<'a> ProjectLocationJobCreateCall<'a> {
///
/// Even though the property as already been set when instantiating this call,
/// we provide this method for API completeness.
pub fn request(mut self, new_value: Job) -> ProjectLocationJobCreateCall<'a> {
pub fn request(mut self, new_value: Job) -> ProjectLocationJobCreateCall<'a, S> {
self._request = new_value;
self
}
@@ -2630,7 +2665,7 @@ impl<'a> ProjectLocationJobCreateCall<'a> {
///
/// Even though the property as already been set when instantiating this call,
/// we provide this method for API completeness.
pub fn parent(mut self, new_value: &str) -> ProjectLocationJobCreateCall<'a> {
pub fn parent(mut self, new_value: &str) -> ProjectLocationJobCreateCall<'a, S> {
self._parent = new_value.to_string();
self
}
@@ -2640,7 +2675,7 @@ impl<'a> ProjectLocationJobCreateCall<'a> {
/// It should be used to handle progress information, and to implement a certain level of resilience.
///
/// Sets the *delegate* property to the given value.
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobCreateCall<'a> {
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobCreateCall<'a, S> {
self._delegate = Some(new_value);
self
}
@@ -2665,7 +2700,7 @@ impl<'a> ProjectLocationJobCreateCall<'a> {
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobCreateCall<'a>
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobCreateCall<'a, S>
where T: AsRef<str> {
self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string());
self
@@ -2685,9 +2720,9 @@ impl<'a> ProjectLocationJobCreateCall<'a> {
/// Usually there is more than one suitable scope to authorize an operation, some of which may
/// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
/// sufficient, a read-write scope will do as well.
pub fn add_scope<T, S>(mut self, scope: T) -> ProjectLocationJobCreateCall<'a>
where T: Into<Option<S>>,
S: AsRef<str> {
pub fn add_scope<T, St>(mut self, scope: T) -> ProjectLocationJobCreateCall<'a, S>
where T: Into<Option<St>>,
St: AsRef<str> {
match scope.into() {
Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()),
None => None,
@@ -2719,7 +2754,7 @@ impl<'a> ProjectLocationJobCreateCall<'a> {
/// # secret,
/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// # ).build().await.unwrap();
/// # let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
/// # let mut hub = Transcoder::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 !
@@ -2728,10 +2763,10 @@ impl<'a> ProjectLocationJobCreateCall<'a> {
/// .doit().await;
/// # }
/// ```
pub struct ProjectLocationJobDeleteCall<'a>
where {
pub struct ProjectLocationJobDeleteCall<'a, S>
where S: 'a {
hub: &'a Transcoder<>,
hub: &'a Transcoder<S>,
_name: String,
_allow_missing: Option<bool>,
_delegate: Option<&'a mut dyn client::Delegate>,
@@ -2739,9 +2774,15 @@ pub struct ProjectLocationJobDeleteCall<'a>
_scopes: BTreeMap<String, ()>
}
impl<'a> client::CallBuilder for ProjectLocationJobDeleteCall<'a> {}
impl<'a, S> client::CallBuilder for ProjectLocationJobDeleteCall<'a, S> {}
impl<'a> ProjectLocationJobDeleteCall<'a> {
impl<'a, S> ProjectLocationJobDeleteCall<'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>>,
{
/// Perform the operation you have build so far.
@@ -2891,14 +2932,14 @@ impl<'a> ProjectLocationJobDeleteCall<'a> {
///
/// Even though the property as already been set when instantiating this call,
/// we provide this method for API completeness.
pub fn name(mut self, new_value: &str) -> ProjectLocationJobDeleteCall<'a> {
pub fn name(mut self, new_value: &str) -> ProjectLocationJobDeleteCall<'a, S> {
self._name = new_value.to_string();
self
}
/// If set to true, and the job is not found, the request will succeed but no action will be taken on the server.
///
/// Sets the *allow missing* query property to the given value.
pub fn allow_missing(mut self, new_value: bool) -> ProjectLocationJobDeleteCall<'a> {
pub fn allow_missing(mut self, new_value: bool) -> ProjectLocationJobDeleteCall<'a, S> {
self._allow_missing = Some(new_value);
self
}
@@ -2908,7 +2949,7 @@ impl<'a> ProjectLocationJobDeleteCall<'a> {
/// It should be used to handle progress information, and to implement a certain level of resilience.
///
/// Sets the *delegate* property to the given value.
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobDeleteCall<'a> {
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobDeleteCall<'a, S> {
self._delegate = Some(new_value);
self
}
@@ -2933,7 +2974,7 @@ impl<'a> ProjectLocationJobDeleteCall<'a> {
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobDeleteCall<'a>
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobDeleteCall<'a, S>
where T: AsRef<str> {
self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string());
self
@@ -2953,9 +2994,9 @@ impl<'a> ProjectLocationJobDeleteCall<'a> {
/// Usually there is more than one suitable scope to authorize an operation, some of which may
/// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
/// sufficient, a read-write scope will do as well.
pub fn add_scope<T, S>(mut self, scope: T) -> ProjectLocationJobDeleteCall<'a>
where T: Into<Option<S>>,
S: AsRef<str> {
pub fn add_scope<T, St>(mut self, scope: T) -> ProjectLocationJobDeleteCall<'a, S>
where T: Into<Option<St>>,
St: AsRef<str> {
match scope.into() {
Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()),
None => None,
@@ -2987,7 +3028,7 @@ impl<'a> ProjectLocationJobDeleteCall<'a> {
/// # secret,
/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// # ).build().await.unwrap();
/// # let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
/// # let mut hub = Transcoder::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 !
@@ -2995,19 +3036,25 @@ impl<'a> ProjectLocationJobDeleteCall<'a> {
/// .doit().await;
/// # }
/// ```
pub struct ProjectLocationJobGetCall<'a>
where {
pub struct ProjectLocationJobGetCall<'a, S>
where S: 'a {
hub: &'a Transcoder<>,
hub: &'a Transcoder<S>,
_name: String,
_delegate: Option<&'a mut dyn client::Delegate>,
_additional_params: HashMap<String, String>,
_scopes: BTreeMap<String, ()>
}
impl<'a> client::CallBuilder for ProjectLocationJobGetCall<'a> {}
impl<'a, S> client::CallBuilder for ProjectLocationJobGetCall<'a, S> {}
impl<'a> ProjectLocationJobGetCall<'a> {
impl<'a, S> ProjectLocationJobGetCall<'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>>,
{
/// Perform the operation you have build so far.
@@ -3154,7 +3201,7 @@ impl<'a> ProjectLocationJobGetCall<'a> {
///
/// Even though the property as already been set when instantiating this call,
/// we provide this method for API completeness.
pub fn name(mut self, new_value: &str) -> ProjectLocationJobGetCall<'a> {
pub fn name(mut self, new_value: &str) -> ProjectLocationJobGetCall<'a, S> {
self._name = new_value.to_string();
self
}
@@ -3164,7 +3211,7 @@ impl<'a> ProjectLocationJobGetCall<'a> {
/// It should be used to handle progress information, and to implement a certain level of resilience.
///
/// Sets the *delegate* property to the given value.
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobGetCall<'a> {
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobGetCall<'a, S> {
self._delegate = Some(new_value);
self
}
@@ -3189,7 +3236,7 @@ impl<'a> ProjectLocationJobGetCall<'a> {
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobGetCall<'a>
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobGetCall<'a, S>
where T: AsRef<str> {
self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string());
self
@@ -3209,9 +3256,9 @@ impl<'a> ProjectLocationJobGetCall<'a> {
/// Usually there is more than one suitable scope to authorize an operation, some of which may
/// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
/// sufficient, a read-write scope will do as well.
pub fn add_scope<T, S>(mut self, scope: T) -> ProjectLocationJobGetCall<'a>
where T: Into<Option<S>>,
S: AsRef<str> {
pub fn add_scope<T, St>(mut self, scope: T) -> ProjectLocationJobGetCall<'a, S>
where T: Into<Option<St>>,
St: AsRef<str> {
match scope.into() {
Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()),
None => None,
@@ -3243,7 +3290,7 @@ impl<'a> ProjectLocationJobGetCall<'a> {
/// # secret,
/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// # ).build().await.unwrap();
/// # let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
/// # let mut hub = Transcoder::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 !
@@ -3255,10 +3302,10 @@ impl<'a> ProjectLocationJobGetCall<'a> {
/// .doit().await;
/// # }
/// ```
pub struct ProjectLocationJobListCall<'a>
where {
pub struct ProjectLocationJobListCall<'a, S>
where S: 'a {
hub: &'a Transcoder<>,
hub: &'a Transcoder<S>,
_parent: String,
_page_token: Option<String>,
_page_size: Option<i32>,
@@ -3269,9 +3316,15 @@ pub struct ProjectLocationJobListCall<'a>
_scopes: BTreeMap<String, ()>
}
impl<'a> client::CallBuilder for ProjectLocationJobListCall<'a> {}
impl<'a, S> client::CallBuilder for ProjectLocationJobListCall<'a, S> {}
impl<'a> ProjectLocationJobListCall<'a> {
impl<'a, S> ProjectLocationJobListCall<'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>>,
{
/// Perform the operation you have build so far.
@@ -3430,35 +3483,35 @@ impl<'a> ProjectLocationJobListCall<'a> {
///
/// Even though the property as already been set when instantiating this call,
/// we provide this method for API completeness.
pub fn parent(mut self, new_value: &str) -> ProjectLocationJobListCall<'a> {
pub fn parent(mut self, new_value: &str) -> ProjectLocationJobListCall<'a, S> {
self._parent = new_value.to_string();
self
}
/// The `next_page_token` value returned from a previous List request, if any.
///
/// Sets the *page token* query property to the given value.
pub fn page_token(mut self, new_value: &str) -> ProjectLocationJobListCall<'a> {
pub fn page_token(mut self, new_value: &str) -> ProjectLocationJobListCall<'a, S> {
self._page_token = Some(new_value.to_string());
self
}
/// The maximum number of items to return.
///
/// Sets the *page size* query property to the given value.
pub fn page_size(mut self, new_value: i32) -> ProjectLocationJobListCall<'a> {
pub fn page_size(mut self, new_value: i32) -> ProjectLocationJobListCall<'a, S> {
self._page_size = Some(new_value);
self
}
/// One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.
///
/// Sets the *order by* query property to the given value.
pub fn order_by(mut self, new_value: &str) -> ProjectLocationJobListCall<'a> {
pub fn order_by(mut self, new_value: &str) -> ProjectLocationJobListCall<'a, S> {
self._order_by = Some(new_value.to_string());
self
}
/// The filter expression, following the syntax outlined in https://google.aip.dev/160.
///
/// Sets the *filter* query property to the given value.
pub fn filter(mut self, new_value: &str) -> ProjectLocationJobListCall<'a> {
pub fn filter(mut self, new_value: &str) -> ProjectLocationJobListCall<'a, S> {
self._filter = Some(new_value.to_string());
self
}
@@ -3468,7 +3521,7 @@ impl<'a> ProjectLocationJobListCall<'a> {
/// It should be used to handle progress information, and to implement a certain level of resilience.
///
/// Sets the *delegate* property to the given value.
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobListCall<'a> {
pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProjectLocationJobListCall<'a, S> {
self._delegate = Some(new_value);
self
}
@@ -3493,7 +3546,7 @@ impl<'a> ProjectLocationJobListCall<'a> {
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobListCall<'a>
pub fn param<T>(mut self, name: T, value: T) -> ProjectLocationJobListCall<'a, S>
where T: AsRef<str> {
self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string());
self
@@ -3513,9 +3566,9 @@ impl<'a> ProjectLocationJobListCall<'a> {
/// Usually there is more than one suitable scope to authorize an operation, some of which may
/// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
/// sufficient, a read-write scope will do as well.
pub fn add_scope<T, S>(mut self, scope: T) -> ProjectLocationJobListCall<'a>
where T: Into<Option<S>>,
S: AsRef<str> {
pub fn add_scope<T, St>(mut self, scope: T) -> ProjectLocationJobListCall<'a, S>
where T: Into<Option<St>>,
St: AsRef<str> {
match scope.into() {
Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()),
None => None,

View File

@@ -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());

View File

@@ -1,8 +1,8 @@
// 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 *Transcoder* crate version *3.1.0+20220201*, where *20220201* is the exact revision of the *transcoder:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v3.1.0*.
//! This documentation was generated from *Transcoder* crate version *4.0.1+20220201*, where *20220201* is the exact revision of the *transcoder:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v4.0.1*.
//!
//! Everything else about the *Transcoder* *v1* API can be found at the
//! [official documentation site](https://cloud.google.com/transcoder/docs/).
@@ -93,7 +93,7 @@
//! secret,
//! oauth2::InstalledFlowReturnMethod::HTTPRedirect,
//! ).build().await.unwrap();
//! let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
//! let mut hub = Transcoder::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().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 !
@@ -185,7 +185,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]