From 4cf0720ef1e025737416ad5fe07eff2389c86ad8 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 16 Apr 2015 22:51:07 +0200 Subject: [PATCH] fix(checkin): latest version of all APIs Now CLI and API and the same level --- gen/adexchangebuyer1d3/README.md | 20 +- gen/adexchangebuyer1d3/src/cmn.rs | 46 +- gen/adexchangebuyer1d3/src/lib.rs | 402 +- gen/adexchangeseller2/README.md | 20 +- gen/adexchangeseller2/src/cmn.rs | 46 +- gen/adexchangeseller2/src/lib.rs | 393 +- gen/admin1_directory/README.md | 20 +- gen/admin1_directory/src/cmn.rs | 46 +- gen/admin1_directory/src/lib.rs | 1507 +++--- gen/admin1_reports/README.md | 20 +- gen/admin1_reports/src/cmn.rs | 46 +- gen/admin1_reports/src/lib.rs | 265 +- gen/admin2_email_migration/README.md | 20 +- gen/admin2_email_migration/src/cmn.rs | 46 +- gen/admin2_email_migration/src/lib.rs | 55 +- gen/adsense1d4/README.md | 20 +- gen/adsense1d4/src/cmn.rs | 46 +- gen/adsense1d4/src/lib.rs | 990 ++-- gen/adsensehost4d1/README.md | 20 +- gen/adsensehost4d1/src/cmn.rs | 46 +- gen/adsensehost4d1/src/lib.rs | 630 ++- gen/analytics3/README.md | 20 +- gen/analytics3/src/cmn.rs | 46 +- gen/analytics3/src/lib.rs | 2144 ++++---- gen/androidenterprise1/README.md | 20 +- gen/androidenterprise1/src/cmn.rs | 46 +- gen/androidenterprise1/src/lib.rs | 911 ++-- gen/androidpublisher2/README.md | 20 +- gen/androidpublisher2/src/cmn.rs | 46 +- gen/androidpublisher2/src/lib.rs | 1141 ++--- gen/appsactivity1/README.md | 20 +- gen/appsactivity1/src/cmn.rs | 46 +- gen/appsactivity1/src/lib.rs | 106 +- gen/appstate1/README.md | 20 +- gen/appstate1/src/cmn.rs | 46 +- gen/appstate1/src/lib.rs | 124 +- gen/audit1/README.md | 20 +- gen/audit1/src/cmn.rs | 46 +- gen/audit1/src/lib.rs | 110 +- gen/autoscaler1_beta2/README.md | 20 +- gen/autoscaler1_beta2/src/cmn.rs | 46 +- gen/autoscaler1_beta2/src/lib.rs | 267 +- gen/bigquery2/README.md | 20 +- gen/bigquery2/src/cmn.rs | 46 +- gen/bigquery2/src/lib.rs | 526 +- gen/blogger3/README.md | 20 +- gen/blogger3/src/cmn.rs | 46 +- gen/blogger3/src/lib.rs | 1003 ++-- gen/books1/README.md | 20 +- gen/books1/src/cmn.rs | 46 +- gen/books1/src/lib.rs | 1524 +++--- gen/calendar3/README.md | 20 +- gen/calendar3/src/cmn.rs | 46 +- gen/calendar3/src/lib.rs | 1027 ++-- gen/civicinfo2/README.md | 20 +- gen/civicinfo2/src/cmn.rs | 46 +- gen/civicinfo2/src/lib.rs | 163 +- gen/cloudlatencytest2/README.md | 20 +- gen/cloudlatencytest2/src/cmn.rs | 46 +- gen/cloudlatencytest2/src/lib.rs | 66 +- gen/cloudmonitoring2_beta2/README.md | 20 +- gen/cloudmonitoring2_beta2/src/cmn.rs | 46 +- gen/cloudmonitoring2_beta2/src/lib.rs | 249 +- gen/cloudsearch1/README.md | 20 +- gen/cloudsearch1/src/cmn.rs | 46 +- gen/cloudsearch1/src/lib.rs | 230 +- gen/compute1/README.md | 20 +- gen/compute1/src/cmn.rs | 46 +- gen/compute1/src/lib.rs | 3388 ++++++------ gen/container1_beta1/README.md | 20 +- gen/container1_beta1/src/cmn.rs | 46 +- gen/container1_beta1/src/lib.rs | 192 +- gen/content2/README.md | 20 +- gen/content2/src/cmn.rs | 46 +- gen/content2/src/lib.rs | 810 ++- gen/coordinate1/README.md | 20 +- gen/coordinate1/src/lib.rs | 477 +- gen/customsearch1/README.md | 20 +- gen/customsearch1/src/lib.rs | 230 +- gen/dataflow1_b4/src/cmn.rs | 46 +- gen/datastore1_beta2/README.md | 20 +- gen/datastore1_beta2/src/cmn.rs | 46 +- gen/datastore1_beta2/src/lib.rs | 150 +- gen/deploymentmanager2_beta1/README.md | 20 +- gen/deploymentmanager2_beta1/src/cmn.rs | 46 +- gen/deploymentmanager2_beta1/src/lib.rs | 297 +- gen/dfareporting2/README.md | 20 +- gen/dfareporting2/src/cmn.rs | 46 +- gen/dfareporting2/src/lib.rs | 4545 ++++++++--------- gen/discovery1/README.md | 20 +- gen/discovery1/src/cmn.rs | 46 +- gen/discovery1/src/lib.rs | 108 +- gen/dns1_beta1/README.md | 20 +- gen/dns1_beta1/src/cmn.rs | 46 +- gen/dns1_beta1/src/lib.rs | 249 +- gen/doubleclickbidmanager1/README.md | 20 +- gen/doubleclickbidmanager1/src/cmn.rs | 46 +- gen/doubleclickbidmanager1/src/lib.rs | 126 +- gen/doubleclicksearch2/README.md | 20 +- gen/doubleclicksearch2/src/cmn.rs | 46 +- gen/doubleclicksearch2/src/lib.rs | 250 +- gen/drive2/README.md | 20 +- gen/drive2/src/cmn.rs | 46 +- gen/drive2/src/lib.rs | 1483 +++--- gen/fitness1/README.md | 20 +- gen/fitness1/src/cmn.rs | 46 +- gen/fitness1/src/lib.rs | 315 +- gen/freebase1/README.md | 20 +- gen/freebase1/src/cmn.rs | 46 +- gen/freebase1/src/lib.rs | 207 +- gen/freebase1_sandbox/README.md | 20 +- gen/freebase1_sandbox/src/cmn.rs | 46 +- gen/freebase1_sandbox/src/lib.rs | 207 +- gen/fusiontables2/README.md | 20 +- gen/fusiontables2/src/cmn.rs | 46 +- gen/fusiontables2/src/lib.rs | 719 ++- gen/games1/README.md | 20 +- gen/games1/src/lib.rs | 1378 +++-- .../README.md | 20 +- .../src/cmn.rs | 46 +- .../src/lib.rs | 251 +- gen/gamesmanagement1_management/README.md | 20 +- gen/gamesmanagement1_management/src/cmn.rs | 46 +- gen/gamesmanagement1_management/src/lib.rs | 375 +- gen/gan1_beta1/README.md | 20 +- gen/gan1_beta1/src/cmn.rs | 46 +- gen/gan1_beta1/src/lib.rs | 494 +- gen/genomics1_beta2/README.md | 20 +- gen/genomics1_beta2/src/cmn.rs | 46 +- gen/genomics1_beta2/src/lib.rs | 1062 ++-- gen/gmail1/README.md | 20 +- gen/gmail1/src/cmn.rs | 46 +- gen/gmail1/src/lib.rs | 687 ++- gen/groupssettings1/README.md | 20 +- gen/groupssettings1/src/cmn.rs | 46 +- gen/groupssettings1/src/lib.rs | 83 +- gen/identitytoolkit3/README.md | 20 +- gen/identitytoolkit3/src/cmn.rs | 46 +- gen/identitytoolkit3/src/lib.rs | 141 +- gen/licensing1/README.md | 20 +- gen/licensing1/src/cmn.rs | 46 +- gen/licensing1/src/lib.rs | 207 +- gen/logging1_beta3/README.md | 20 +- gen/logging1_beta3/src/cmn.rs | 46 +- gen/logging1_beta3/src/lib.rs | 399 +- gen/manager1_beta2/README.md | 20 +- gen/manager1_beta2/src/cmn.rs | 46 +- gen/manager1_beta2/src/lib.rs | 178 +- gen/mirror1/README.md | 20 +- gen/mirror1/src/cmn.rs | 46 +- gen/mirror1/src/lib.rs | 476 +- gen/oauth2_v2/README.md | 20 +- gen/oauth2_v2/src/cmn.rs | 46 +- gen/oauth2_v2/src/lib.rs | 171 +- gen/pagespeedonline2/README.md | 20 +- gen/pagespeedonline2/src/cmn.rs | 46 +- gen/pagespeedonline2/src/lib.rs | 102 +- gen/plus1/README.md | 20 +- gen/plus1/src/cmn.rs | 46 +- gen/plus1/src/lib.rs | 414 +- gen/plusdomains1/README.md | 20 +- gen/plusdomains1/src/cmn.rs | 46 +- gen/plusdomains1/src/lib.rs | 493 +- gen/prediction1d6/README.md | 20 +- gen/prediction1d6/src/cmn.rs | 46 +- gen/prediction1d6/src/lib.rs | 232 +- gen/pubsub1_beta2/README.md | 20 +- gen/pubsub1_beta2/src/cmn.rs | 46 +- gen/pubsub1_beta2/src/lib.rs | 240 +- gen/qpxexpress1/README.md | 20 +- gen/qpxexpress1/src/cmn.rs | 46 +- gen/qpxexpress1/src/lib.rs | 85 +- gen/replicapool1_beta2/README.md | 20 +- gen/replicapool1_beta2/src/cmn.rs | 46 +- gen/replicapool1_beta2/src/lib.rs | 348 +- gen/replicapoolupdater1_beta1/README.md | 20 +- gen/replicapoolupdater1_beta1/src/cmn.rs | 46 +- gen/replicapoolupdater1_beta1/src/lib.rs | 280 +- gen/reseller1_sandbox/README.md | 20 +- gen/reseller1_sandbox/src/cmn.rs | 46 +- gen/reseller1_sandbox/src/lib.rs | 301 +- gen/resourceviews1_beta2/README.md | 20 +- gen/resourceviews1_beta2/src/cmn.rs | 46 +- gen/resourceviews1_beta2/src/lib.rs | 342 +- gen/siteverification1/README.md | 20 +- gen/siteverification1/src/cmn.rs | 46 +- gen/siteverification1/src/lib.rs | 135 +- gen/spectrum1_explorer/README.md | 20 +- gen/spectrum1_explorer/src/cmn.rs | 46 +- gen/spectrum1_explorer/src/lib.rs | 108 +- gen/sqladmin1_beta4/README.md | 20 +- gen/sqladmin1_beta4/src/cmn.rs | 46 +- gen/sqladmin1_beta4/src/lib.rs | 747 ++- gen/storage1/README.md | 20 +- gen/storage1/src/cmn.rs | 46 +- gen/storage1/src/lib.rs | 1199 ++--- gen/tagmanager1/README.md | 20 +- gen/tagmanager1/src/lib.rs | 1040 ++-- gen/taskqueue1_beta2/README.md | 20 +- gen/taskqueue1_beta2/src/cmn.rs | 46 +- gen/taskqueue1_beta2/src/lib.rs | 231 +- gen/tasks1/README.md | 20 +- gen/tasks1/src/cmn.rs | 46 +- gen/tasks1/src/lib.rs | 330 +- gen/translate2/README.md | 20 +- gen/translate2/src/cmn.rs | 46 +- gen/translate2/src/lib.rs | 101 +- gen/urlshortener1/README.md | 20 +- gen/urlshortener1/src/cmn.rs | 46 +- gen/urlshortener1/src/lib.rs | 90 +- gen/webfonts1/README.md | 20 +- gen/webfonts1/src/cmn.rs | 46 +- gen/webfonts1/src/lib.rs | 54 +- gen/webmasters3/README.md | 20 +- gen/webmasters3/src/cmn.rs | 46 +- gen/webmasters3/src/lib.rs | 278 +- gen/youtube3/README.md | 20 +- gen/youtube3/src/cmn.rs | 46 +- gen/youtube3/src/lib.rs | 1848 +++---- gen/youtubeanalytics1/README.md | 20 +- gen/youtubeanalytics1/src/cmn.rs | 46 +- gen/youtubeanalytics1/src/lib.rs | 281 +- 222 files changed, 23770 insertions(+), 23809 deletions(-) diff --git a/gen/adexchangebuyer1d3/README.md b/gen/adexchangebuyer1d3/README.md index 5b1be770e8..16e67277fe 100644 --- a/gen/adexchangebuyer1d3/README.md +++ b/gen/adexchangebuyer1d3/README.md @@ -118,16 +118,18 @@ let result = hub.pretargeting_config().patch(&req, "accountId", "configId") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/adexchangebuyer1d3/src/cmn.rs b/gen/adexchangebuyer1d3/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/adexchangebuyer1d3/src/cmn.rs +++ b/gen/adexchangebuyer1d3/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/adexchangebuyer1d3/src/lib.rs b/gen/adexchangebuyer1d3/src/lib.rs index 83ceedf182..df728f13d9 100644 --- a/gen/adexchangebuyer1d3/src/lib.rs +++ b/gen/adexchangebuyer1d3/src/lib.rs @@ -119,16 +119,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -292,16 +294,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -446,7 +450,7 @@ impl ResponseResult for Account {} /// /// * [list pretargeting config](struct.PretargetingConfigListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PretargetingConfigList { /// A list of pretargeting configs pub items: Vec, @@ -482,7 +486,7 @@ impl Part for CreativeFilteringReasons {} /// /// * [get billing info](struct.BillingInfoGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BillingInfo { /// Resource type. pub kind: String, @@ -509,7 +513,7 @@ impl ResponseResult for BillingInfo {} /// /// * [list direct deals](struct.DirectDealListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DirectDealsList { /// Resource type. pub kind: String, @@ -530,7 +534,7 @@ impl ResponseResult for DirectDealsList {} /// /// * [list accounts](struct.AccountListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountsList { /// A list of accounts. pub items: Vec, @@ -550,7 +554,7 @@ impl ResponseResult for AccountsList {} /// /// * [list creatives](struct.CreativeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativesList { /// Continuation token used to page through creatives. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -682,7 +686,7 @@ impl ResponseResult for Creative {} /// /// * [list performance report](struct.PerformanceReportListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PerformanceReportList { /// Resource type. pub kind: String, @@ -749,7 +753,7 @@ impl Part for PretargetingConfigDimensions {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PerformanceReport { /// Average QPS for cookie matcher operations. #[serde(rename="cookieMatcherStatusRate")] @@ -826,7 +830,7 @@ impl Part for CreativeCorrections {} /// /// * [list billing info](struct.BillingInfoListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BillingInfoList { /// A list of billing info relevant for your account. pub items: Vec, @@ -847,7 +851,7 @@ impl ResponseResult for BillingInfoList {} /// * [get direct deals](struct.DirectDealGetCall.html) (response) /// * [list direct deals](struct.DirectDealListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DirectDeal { /// The name of the advertiser this deal is for. pub advertiser: String, @@ -1837,23 +1841,22 @@ impl<'a, C, A> BillingInfoGetCall<'a, C, A> where C: BorrowMut, A } + /// The account id. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The account id. pub fn account_id(mut self, new_value: i32) -> BillingInfoGetCall<'a, C, A> { self._account_id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BillingInfoGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1883,8 +1886,8 @@ impl<'a, C, A> BillingInfoGetCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2042,13 +2045,12 @@ impl<'a, C, A> BillingInfoListCall<'a, C, A> where C: BorrowMut, } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BillingInfoListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2078,8 +2080,8 @@ impl<'a, C, A> BillingInfoListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2237,13 +2239,12 @@ impl<'a, C, A> DirectDealListCall<'a, C, A> where C: BorrowMut, A } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DirectDealListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2273,8 +2274,8 @@ impl<'a, C, A> DirectDealListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2458,23 +2459,22 @@ impl<'a, C, A> DirectDealGetCall<'a, C, A> where C: BorrowMut, A: } + /// The direct deal id + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The direct deal id pub fn id(mut self, new_value: &str) -> DirectDealGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DirectDealGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2504,8 +2504,8 @@ impl<'a, C, A> DirectDealGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2706,42 +2706,41 @@ impl<'a, C, A> BudgetPatchCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Budget) -> BudgetPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The account id associated with the budget being updated. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The account id associated with the budget being updated. pub fn account_id(mut self, new_value: &str) -> BudgetPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// The billing id associated with the budget being updated. + /// /// Sets the *billing id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The billing id associated with the budget being updated. pub fn billing_id(mut self, new_value: &str) -> BudgetPatchCall<'a, C, A> { self._billing_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BudgetPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2771,8 +2770,8 @@ impl<'a, C, A> BudgetPatchCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2973,42 +2972,41 @@ impl<'a, C, A> BudgetUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Budget) -> BudgetUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The account id associated with the budget being updated. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The account id associated with the budget being updated. pub fn account_id(mut self, new_value: &str) -> BudgetUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// The billing id associated with the budget being updated. + /// /// Sets the *billing id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The billing id associated with the budget being updated. pub fn billing_id(mut self, new_value: &str) -> BudgetUpdateCall<'a, C, A> { self._billing_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BudgetUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3038,8 +3036,8 @@ impl<'a, C, A> BudgetUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3225,33 +3223,32 @@ impl<'a, C, A> BudgetGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// The account id to get the budget information for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The account id to get the budget information for. pub fn account_id(mut self, new_value: &str) -> BudgetGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// The billing id to get the budget information for. + /// /// Sets the *billing id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The billing id to get the budget information for. pub fn billing_id(mut self, new_value: &str) -> BudgetGetCall<'a, C, A> { self._billing_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BudgetGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3281,8 +3278,8 @@ impl<'a, C, A> BudgetGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3455,22 +3452,21 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Creative) -> CreativeInsertCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3500,8 +3496,8 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3692,55 +3688,49 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: } - /// Sets the *status filter* query property to the given value. - /// - /// /// When specified, only creatives having the given status are returned. + /// + /// Sets the *status filter* query property to the given value. pub fn status_filter(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._status_filter = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of entries returned on one result page. If not set, the default is 100. Optional. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> CreativeListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// When specified, only creatives for the given buyer creative ids are returned. + /// /// Append the given value to the *buyer creative id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// When specified, only creatives for the given buyer creative ids are returned. pub fn add_buyer_creative_id(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._buyer_creative_id.push(new_value.to_string()); self } + /// When specified, only creatives for the given account ids are returned. + /// /// Append the given value to the *account id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// When specified, only creatives for the given account ids are returned. pub fn add_account_id(mut self, new_value: i32) -> CreativeListCall<'a, C, A> { self._account_id.push(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3770,8 +3760,8 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3957,33 +3947,32 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o } + /// The id for the account that will serve this creative. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The id for the account that will serve this creative. pub fn account_id(mut self, new_value: i32) -> CreativeGetCall<'a, C, A> { self._account_id = new_value; self } + /// The buyer-specific id for this creative. + /// /// Sets the *buyer creative id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The buyer-specific id for this creative. pub fn buyer_creative_id(mut self, new_value: &str) -> CreativeGetCall<'a, C, A> { self._buyer_creative_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4013,8 +4002,8 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4213,32 +4202,31 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Account) -> AccountUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The account id + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The account id pub fn id(mut self, new_value: i32) -> AccountUpdateCall<'a, C, A> { self._id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4268,8 +4256,8 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4468,32 +4456,31 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Account) -> AccountPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The account id + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The account id pub fn id(mut self, new_value: i32) -> AccountPatchCall<'a, C, A> { self._id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4523,8 +4510,8 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4682,13 +4669,12 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4718,8 +4704,8 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4903,23 +4889,22 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The account id + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The account id pub fn id(mut self, new_value: i32) -> AccountGetCall<'a, C, A> { self._id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4949,8 +4934,8 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5124,59 +5109,56 @@ impl<'a, C, A> PerformanceReportListCall<'a, C, A> where C: BorrowMut PerformanceReportListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// The end time of the report in ISO 8601 timestamp format using UTC. + /// /// Sets the *end date time* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The end time of the report in ISO 8601 timestamp format using UTC. pub fn end_date_time(mut self, new_value: &str) -> PerformanceReportListCall<'a, C, A> { self._end_date_time = new_value.to_string(); self } + /// The start time of the report in ISO 8601 timestamp format using UTC. + /// /// Sets the *start date time* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The start time of the report in ISO 8601 timestamp format using UTC. pub fn start_date_time(mut self, new_value: &str) -> PerformanceReportListCall<'a, C, A> { self._start_date_time = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through performance reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> PerformanceReportListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of entries returned on one result page. If not set, the default is 100. Optional. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> PerformanceReportListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PerformanceReportListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5206,8 +5188,8 @@ impl<'a, C, A> PerformanceReportListCall<'a, C, A> where C: BorrowMut PretargetingConfigDeleteCall<'a, C, A> where C: BorrowMut PretargetingConfigDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// The specific id of the configuration to delete. + /// /// Sets the *config id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The specific id of the configuration to delete. pub fn config_id(mut self, new_value: &str) -> PretargetingConfigDeleteCall<'a, C, A> { self._config_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PretargetingConfigDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5438,8 +5419,8 @@ impl<'a, C, A> PretargetingConfigDeleteCall<'a, C, A> where C: BorrowMut PretargetingConfigPatchCall<'a, C, A> where C: BorrowMut PretargetingConfigPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The account id to update the pretargeting config for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The account id to update the pretargeting config for. pub fn account_id(mut self, new_value: &str) -> PretargetingConfigPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// The specific id of the configuration to update. + /// /// Sets the *config id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The specific id of the configuration to update. pub fn config_id(mut self, new_value: &str) -> PretargetingConfigPatchCall<'a, C, A> { self._config_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PretargetingConfigPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5705,8 +5685,8 @@ impl<'a, C, A> PretargetingConfigPatchCall<'a, C, A> where C: BorrowMut PretargetingConfigGetCall<'a, C, A> where C: BorrowMut PretargetingConfigGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// The specific id of the configuration to retrieve. + /// /// Sets the *config id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The specific id of the configuration to retrieve. pub fn config_id(mut self, new_value: &str) -> PretargetingConfigGetCall<'a, C, A> { self._config_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PretargetingConfigGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5948,8 +5927,8 @@ impl<'a, C, A> PretargetingConfigGetCall<'a, C, A> where C: BorrowMut PretargetingConfigInsertCall<'a, C, A> where C: BorrowMut PretargetingConfigInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The account id to insert the pretargeting config for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The account id to insert the pretargeting config for. pub fn account_id(mut self, new_value: &str) -> PretargetingConfigInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PretargetingConfigInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6203,8 +6181,8 @@ impl<'a, C, A> PretargetingConfigInsertCall<'a, C, A> where C: BorrowMut PretargetingConfigListCall<'a, C, A> where C: BorrowMut PretargetingConfigListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PretargetingConfigListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6434,8 +6411,8 @@ impl<'a, C, A> PretargetingConfigListCall<'a, C, A> where C: BorrowMut PretargetingConfigUpdateCall<'a, C, A> where C: BorrowMut PretargetingConfigUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The account id to update the pretargeting config for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The account id to update the pretargeting config for. pub fn account_id(mut self, new_value: &str) -> PretargetingConfigUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// The specific id of the configuration to update. + /// /// Sets the *config id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The specific id of the configuration to update. pub fn config_id(mut self, new_value: &str) -> PretargetingConfigUpdateCall<'a, C, A> { self._config_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PretargetingConfigUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6701,8 +6677,8 @@ impl<'a, C, A> PretargetingConfigUpdateCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/adexchangeseller2/src/cmn.rs b/gen/adexchangeseller2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/adexchangeseller2/src/cmn.rs +++ b/gen/adexchangeseller2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/adexchangeseller2/src/lib.rs b/gen/adexchangeseller2/src/lib.rs index 10fbb115e8..60e49a4ac9 100644 --- a/gen/adexchangeseller2/src/lib.rs +++ b/gen/adexchangeseller2/src/lib.rs @@ -122,16 +122,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -300,16 +302,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -360,7 +364,7 @@ impl<'a, C, A> AdExchangeSeller /// /// * [urlchannels list accounts](struct.AccountUrlchannelListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UrlChannels { /// Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -398,7 +402,7 @@ impl ResponseResult for UrlChannels {} /// * [preferreddeals list accounts](struct.AccountPreferreddealListCall.html) (none) /// * [get accounts](struct.AccountGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Account { /// Kind of resource this is, in this case adexchangeseller#account. pub kind: String, @@ -421,7 +425,7 @@ impl ResponseResult for Account {} /// /// * [customchannels list accounts](struct.AccountCustomchannelListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomChannels { /// Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -446,7 +450,7 @@ impl ResponseResult for CustomChannels {} /// /// * [alerts list accounts](struct.AccountAlertListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Alerts { /// The alerts returned in this list response. pub items: Vec, @@ -461,7 +465,7 @@ impl ResponseResult for Alerts {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SavedReport { /// Kind of resource this is, in this case adexchangeseller#savedReport. pub kind: String, @@ -478,7 +482,7 @@ impl Part for SavedReport {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdClient { /// This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. #[serde(rename="productCode")] @@ -507,7 +511,7 @@ impl Part for AdClient {} /// /// * [preferreddeals list accounts](struct.AccountPreferreddealListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PreferredDeals { /// The preferred deals returned in this list response. pub items: Vec, @@ -522,7 +526,7 @@ impl ResponseResult for PreferredDeals {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportingMetadataEntry { /// The names of the metrics which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. #[serde(rename="requiredMetrics")] @@ -552,7 +556,7 @@ impl Part for ReportingMetadataEntry {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomChannelTargetingInfo { /// The external description of the channel. pub description: String, @@ -580,7 +584,7 @@ impl Part for CustomChannelTargetingInfo {} /// * [metadata dimensions list accounts](struct.AccountMetadataDimensionListCall.html) (response) /// * [metadata metrics list accounts](struct.AccountMetadataMetricListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Metadata { /// no description provided pub items: Vec, @@ -595,7 +599,7 @@ impl ResponseResult for Metadata {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UrlChannel { /// Kind of resource this is, in this case adexchangeseller#urlChannel. pub kind: String, @@ -618,7 +622,7 @@ impl Part for UrlChannel {} /// /// * [adclients list accounts](struct.AccountAdclientListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdClients { /// Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -643,7 +647,7 @@ impl ResponseResult for AdClients {} /// /// * [preferreddeals get accounts](struct.AccountPreferreddealGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PreferredDeal { /// Kind of resource this is, in this case adexchangeseller#preferredDeal. pub kind: String, @@ -681,7 +685,7 @@ impl ResponseResult for PreferredDeal {} /// /// * [reports saved list accounts](struct.AccountReportSavedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SavedReports { /// Continuation token used to page through saved reports. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -701,7 +705,7 @@ impl ResponseResult for SavedReports {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportHeaders { /// The currency of this column. Only present if the header type is METRIC_CURRENCY. pub currency: String, @@ -720,7 +724,7 @@ impl Part for ReportHeaders {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Alert { /// Unique identifier of this alert. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: String, @@ -747,7 +751,7 @@ impl Part for Alert {} /// /// * [list accounts](struct.AccountListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Accounts { /// Continuation token used to page through accounts. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -773,7 +777,7 @@ impl ResponseResult for Accounts {} /// * [reports saved generate accounts](struct.AccountReportSavedGenerateCall.html) (response) /// * [reports generate accounts](struct.AccountReportGenerateCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Report { /// The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for each metric in the request. pub headers: Vec, @@ -804,7 +808,7 @@ impl ResponseResult for Report {} /// /// * [customchannels get accounts](struct.AccountCustomchannelGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomChannel { /// Kind of resource this is, in this case adexchangeseller#customChannel. pub kind: String, @@ -1329,57 +1333,53 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut AccountReportSavedGenerateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// The saved report to retrieve. + /// /// Sets the *saved report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The saved report to retrieve. pub fn saved_report_id(mut self, new_value: &str) -> AccountReportSavedGenerateCall<'a, C, A> { self._saved_report_id = new_value.to_string(); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first row of report data to return. + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> AccountReportSavedGenerateCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of rows of report data to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountReportSavedGenerateCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> AccountReportSavedGenerateCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountReportSavedGenerateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1409,8 +1409,8 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut AccountMetadataMetricListCall<'a, C, A> where C: BorrowMut AccountMetadataMetricListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountMetadataMetricListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1640,8 +1639,8 @@ impl<'a, C, A> AccountMetadataMetricListCall<'a, C, A> where C: BorrowMut AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountReportGenerateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// /// Sets the *start date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn start_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._start_date = new_value.to_string(); self } + /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// /// Sets the *end date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn end_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._end_date = new_value.to_string(); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first row of report data to return. + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: u32) -> AccountReportGenerateCall<'a, C, A> { self._start_index = Some(new_value); self } + /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. + /// /// Append the given value to the *sort* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. pub fn add_sort(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._sort.push(new_value.to_string()); self } + /// Numeric columns to include in the report. + /// /// Append the given value to the *metric* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Numeric columns to include in the report. pub fn add_metric(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._metric.push(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of rows of report data to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AccountReportGenerateCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } + /// Filters to be run on the report. + /// /// Append the given value to the *filter* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Filters to be run on the report. pub fn add_filter(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._filter.push(new_value.to_string()); self } + /// Dimensions to base the report on. + /// /// Append the given value to the *dimension* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Dimensions to base the report on. pub fn add_dimension(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._dimension.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountReportGenerateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2027,8 +2018,8 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountUrlchannelListCall<'a, C, A> where C: BorrowMut AccountUrlchannelListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client for which to list URL channels. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to list URL channels. pub fn ad_client_id(mut self, new_value: &str) -> AccountUrlchannelListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountUrlchannelListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of URL channels to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AccountUrlchannelListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountUrlchannelListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2296,8 +2284,8 @@ impl<'a, C, A> AccountUrlchannelListCall<'a, C, A> where C: BorrowMut AccountReportSavedListCall<'a, C, A> where C: BorrowMut AccountReportSavedListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountReportSavedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of saved reports to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountReportSavedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountReportSavedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2553,8 +2538,8 @@ impl<'a, C, A> AccountReportSavedListCall<'a, C, A> where C: BorrowMut AccountPreferreddealGetCall<'a, C, A> where C: BorrowMut AccountPreferreddealGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Preferred deal to get information about. + /// /// Sets the *deal id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Preferred deal to get information about. pub fn deal_id(mut self, new_value: &str) -> AccountPreferreddealGetCall<'a, C, A> { self._deal_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountPreferreddealGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2796,8 +2780,8 @@ impl<'a, C, A> AccountPreferreddealGetCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountAdclientListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of ad clients to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AccountAdclientListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdclientListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3053,8 +3034,8 @@ impl<'a, C, A> AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountMetadataDimensionListCall<'a, C, A> where C: BorrowMut AccountMetadataDimensionListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountMetadataDimensionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3284,8 +3264,8 @@ impl<'a, C, A> AccountMetadataDimensionListCall<'a, C, A> where C: BorrowMut AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut AccountCustomchannelGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client which contains the custom channel. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client which contains the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> AccountCustomchannelGetCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Custom channel to retrieve. + /// /// Sets the *custom channel id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom channel to retrieve. pub fn custom_channel_id(mut self, new_value: &str) -> AccountCustomchannelGetCall<'a, C, A> { self._custom_channel_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountCustomchannelGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3539,8 +3518,8 @@ impl<'a, C, A> AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut AccountCustomchannelListCall<'a, C, A> where C: BorrowMut AccountCustomchannelListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client for which to list custom channels. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to list custom channels. pub fn ad_client_id(mut self, new_value: &str) -> AccountCustomchannelListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountCustomchannelListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of custom channels to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AccountCustomchannelListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountCustomchannelListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3808,8 +3784,8 @@ impl<'a, C, A> AccountCustomchannelListCall<'a, C, A> where C: BorrowMut AccountListCall<'a, C, A> where C: BorrowMut, A: o } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of accounts to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4029,8 +4002,8 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeSellerReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4219,31 +4192,29 @@ impl<'a, C, A> AccountAlertListCall<'a, C, A> where C: BorrowMut, } + /// Account owning the alerts. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account owning the alerts. pub fn account_id(mut self, new_value: &str) -> AccountAlertListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *locale* query property to the given value. - /// - /// /// The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> AccountAlertListCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAlertListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4273,8 +4244,8 @@ impl<'a, C, A> AccountAlertListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeSellerReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4458,23 +4429,22 @@ impl<'a, C, A> AccountPreferreddealListCall<'a, C, A> where C: BorrowMut AccountPreferreddealListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountPreferreddealListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4504,8 +4474,8 @@ impl<'a, C, A> AccountPreferreddealListCall<'a, C, A> where C: BorrowMut AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// Account to get information about. Tip: 'myaccount' is a valid ID. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account to get information about. Tip: 'myaccount' is a valid ID. pub fn account_id(mut self, new_value: &str) -> AccountGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4735,8 +4704,8 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeSellerReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/admin1_directory/README.md b/gen/admin1_directory/README.md index a5335cd682..97d2b7b5af 100644 --- a/gen/admin1_directory/README.md +++ b/gen/admin1_directory/README.md @@ -161,16 +161,18 @@ let result = hub.users().watch(&req) match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/admin1_directory/src/cmn.rs b/gen/admin1_directory/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/admin1_directory/src/cmn.rs +++ b/gen/admin1_directory/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/admin1_directory/src/lib.rs b/gen/admin1_directory/src/lib.rs index 57c25dca69..2acec28472 100644 --- a/gen/admin1_directory/src/lib.rs +++ b/gen/admin1_directory/src/lib.rs @@ -162,16 +162,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -419,16 +421,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -694,7 +698,7 @@ impl ResponseResult for Member {} /// /// * [list orgunits](struct.OrgunitListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OrgUnits { /// Kind of resource this is. pub kind: String, @@ -719,7 +723,7 @@ impl ResponseResult for OrgUnits {} /// * [delete tokens](struct.TokenDeleteCall.html) (none) /// * [get tokens](struct.TokenGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Token { /// A list of authorization scopes the application is granted. pub scopes: Vec, @@ -756,7 +760,7 @@ impl ResponseResult for Token {} /// /// * [list asps](struct.AspListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Asps { /// A list of ASP resources. pub items: Vec, @@ -858,7 +862,7 @@ impl ResponseResult for Schema {} /// * [delete asps](struct.AspDeleteCall.html) (none) /// * [get asps](struct.AspGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Asp { /// The type of the API resource. This is always admin#directory#asp. pub kind: String, @@ -893,7 +897,7 @@ impl ResponseResult for Asp {} /// /// * [list tokens](struct.TokenListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Tokens { /// A list of Token resources. pub items: Vec, @@ -915,7 +919,7 @@ impl ResponseResult for Tokens {} /// /// * [list notifications](struct.NotificationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Notifications { /// Token for fetching the next page of notifications. #[serde(rename="nextPageToken")] @@ -1150,7 +1154,7 @@ impl ResponseResult for User {} /// /// * [list groups](struct.GroupListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Groups { /// Token used to access next page of this result. #[serde(rename="nextPageToken")] @@ -1187,7 +1191,7 @@ impl Part for ChromeOsDeviceRecentUsers {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MobileDeviceApplications { /// Version code of application #[serde(rename="versionCode")] @@ -1228,7 +1232,7 @@ impl Part for UserCustomProperties {} /// /// * [list members](struct.MemberListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Members { /// Token used to access next page of this result. #[serde(rename="nextPageToken")] @@ -1272,7 +1276,7 @@ impl RequestValue for UserUndelete {} /// /// * [list verification codes](struct.VerificationCodeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VerificationCodes { /// A list of verification code resources. pub items: Vec, @@ -1323,7 +1327,7 @@ impl ResponseResult for Alias {} /// /// * [list mobiledevices](struct.MobiledeviceListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MobileDevices { /// Token used to access next page of this result. #[serde(rename="nextPageToken")] @@ -1439,7 +1443,7 @@ impl RequestValue for UserMakeAdmin {} /// /// * [list users](struct.UserListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Users { /// Token used to access next page of this result. #[serde(rename="nextPageToken")] @@ -1466,7 +1470,7 @@ impl ResponseResult for Users {} /// /// * [get mobiledevices](struct.MobiledeviceGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MobileDevice { /// Mobile Device Kernel version (Read-only) #[serde(rename="kernelVersion")] @@ -1551,7 +1555,7 @@ impl ResponseResult for MobileDevice {} /// /// * [list chromeosdevices](struct.ChromeosdeviceListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChromeOsDevices { /// Token used to access next page of this result. #[serde(rename="nextPageToken")] @@ -1622,7 +1626,7 @@ impl ResponseResult for OrgUnit {} /// * [list verification codes](struct.VerificationCodeListCall.html) (none) /// * [generate verification codes](struct.VerificationCodeGenerateCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VerificationCode { /// The type of the resource. This is always admin#directory#verificationCode. pub kind: Option, @@ -1666,7 +1670,7 @@ impl Part for SchemaFieldSpecNumericIndexingSpec {} /// /// * [list schemas](struct.SchemaListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Schemas { /// Kind of resource this is. pub kind: String, @@ -1689,7 +1693,7 @@ impl ResponseResult for Schemas {} /// * [aliases list users](struct.UserAliaseListCall.html) (response) /// * [aliases list groups](struct.GroupAliaseListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Aliases { /// Kind of resource this is. pub kind: String, @@ -3572,7 +3576,7 @@ impl<'a, C, A> TokenGetCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/tokens/{clientId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey"), ("{clientId}", "clientId")].iter() { @@ -3668,33 +3672,32 @@ impl<'a, C, A> TokenGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> TokenGetCall<'a, C, A> { self._user_key = new_value.to_string(); self } + /// The Client ID of the application the token is issued to. + /// /// Sets the *client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The Client ID of the application the token is issued to. pub fn client_id(mut self, new_value: &str) -> TokenGetCall<'a, C, A> { self._client_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TokenGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3724,8 +3727,8 @@ impl<'a, C, A> TokenGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserSecurity`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3813,7 +3816,7 @@ impl<'a, C, A> TokenListCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/tokens".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -3909,23 +3912,22 @@ impl<'a, C, A> TokenListCall<'a, C, A> where C: BorrowMut, A: oau } + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> TokenListCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TokenListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3955,8 +3957,8 @@ impl<'a, C, A> TokenListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserSecurity`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4045,7 +4047,7 @@ impl<'a, C, A> TokenDeleteCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/tokens/{clientId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey"), ("{clientId}", "clientId")].iter() { @@ -4131,33 +4133,32 @@ impl<'a, C, A> TokenDeleteCall<'a, C, A> where C: BorrowMut, A: o } + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> TokenDeleteCall<'a, C, A> { self._user_key = new_value.to_string(); self } + /// The Client ID of the application the token is issued to. + /// /// Sets the *client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The Client ID of the application the token is issued to. pub fn client_id(mut self, new_value: &str) -> TokenDeleteCall<'a, C, A> { self._client_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TokenDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4187,8 +4188,8 @@ impl<'a, C, A> TokenDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserSecurity`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4280,7 +4281,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/admin/directory/v1//admin/directory_v1/channels/stop".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -4350,22 +4351,21 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> ChannelStopCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChannelStopCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4395,8 +4395,8 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4491,7 +4491,7 @@ impl<'a, C, A> OrgunitInsertCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryOrgunit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId")].iter() { @@ -4595,32 +4595,31 @@ impl<'a, C, A> OrgunitInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &OrgUnit) -> OrgunitInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitInsertCall<'a, C, A> { self._customer_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OrgunitInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4650,8 +4649,8 @@ impl<'a, C, A> OrgunitInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryOrgunit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4749,7 +4748,7 @@ impl<'a, C, A> OrgunitListCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryOrgunitReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId")].iter() { @@ -4845,39 +4844,36 @@ impl<'a, C, A> OrgunitListCall<'a, C, A> where C: BorrowMut, A: o } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitListCall<'a, C, A> { self._customer_id = new_value.to_string(); self } - /// Sets the *type* query property to the given value. - /// - /// /// Whether to return all sub-organizations or just immediate children + /// + /// Sets the *type* query property to the given value. pub fn type_(mut self, new_value: &str) -> OrgunitListCall<'a, C, A> { self._type_ = Some(new_value.to_string()); self } - /// Sets the *org unit path* query property to the given value. - /// - /// /// the URL-encoded organization unit's path or its Id + /// + /// Sets the *org unit path* query property to the given value. pub fn org_unit_path(mut self, new_value: &str) -> OrgunitListCall<'a, C, A> { self._org_unit_path = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OrgunitListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4907,8 +4903,8 @@ impl<'a, C, A> OrgunitListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryOrgunitReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5004,7 +5000,7 @@ impl<'a, C, A> OrgunitGetCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits{/orgUnitPath*}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryOrgunitReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId"), ("{/orgUnitPath*}", "orgUnitPath")].iter() { @@ -5100,34 +5096,33 @@ impl<'a, C, A> OrgunitGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitGetCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Full path of the organization unit or its Id + /// /// Append the given value to the *org unit path* path property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Full path of the organization unit or its Id pub fn add_org_unit_path(mut self, new_value: &str) -> OrgunitGetCall<'a, C, A> { self._org_unit_path.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OrgunitGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5157,8 +5152,8 @@ impl<'a, C, A> OrgunitGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryOrgunitReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5261,7 +5256,7 @@ impl<'a, C, A> OrgunitUpdateCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits{/orgUnitPath*}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryOrgunit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId"), ("{/orgUnitPath*}", "orgUnitPath")].iter() { @@ -5365,43 +5360,42 @@ impl<'a, C, A> OrgunitUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &OrgUnit) -> OrgunitUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitUpdateCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Full path of the organization unit or its Id + /// /// Append the given value to the *org unit path* path property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Full path of the organization unit or its Id pub fn add_org_unit_path(mut self, new_value: &str) -> OrgunitUpdateCall<'a, C, A> { self._org_unit_path.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OrgunitUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5431,8 +5425,8 @@ impl<'a, C, A> OrgunitUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryOrgunit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5527,7 +5521,7 @@ impl<'a, C, A> OrgunitDeleteCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits{/orgUnitPath*}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryOrgunit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId"), ("{/orgUnitPath*}", "orgUnitPath")].iter() { @@ -5613,34 +5607,33 @@ impl<'a, C, A> OrgunitDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitDeleteCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Full path of the organization unit or its Id + /// /// Append the given value to the *org unit path* path property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Full path of the organization unit or its Id pub fn add_org_unit_path(mut self, new_value: &str) -> OrgunitDeleteCall<'a, C, A> { self._org_unit_path.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OrgunitDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5670,8 +5663,8 @@ impl<'a, C, A> OrgunitDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryOrgunit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5774,7 +5767,7 @@ impl<'a, C, A> OrgunitPatchCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits{/orgUnitPath*}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryOrgunit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId"), ("{/orgUnitPath*}", "orgUnitPath")].iter() { @@ -5878,43 +5871,42 @@ impl<'a, C, A> OrgunitPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &OrgUnit) -> OrgunitPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitPatchCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Full path of the organization unit or its Id + /// /// Append the given value to the *org unit path* path property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Full path of the organization unit or its Id pub fn add_org_unit_path(mut self, new_value: &str) -> OrgunitPatchCall<'a, C, A> { self._org_unit_path.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OrgunitPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5944,8 +5936,8 @@ impl<'a, C, A> OrgunitPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryOrgunit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6038,7 +6030,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/admin/directory/v1/users".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -6118,22 +6110,21 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &User) -> UserInsertCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6163,8 +6154,8 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6251,7 +6242,7 @@ impl<'a, C, A> UserPhotoDeleteCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -6337,23 +6328,22 @@ impl<'a, C, A> UserPhotoDeleteCall<'a, C, A> where C: BorrowMut, } + /// Email or immutable Id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserPhotoDeleteCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserPhotoDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6383,8 +6373,8 @@ impl<'a, C, A> UserPhotoDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6478,7 +6468,7 @@ impl<'a, C, A> UserUndeleteCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/undelete".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -6572,32 +6562,31 @@ impl<'a, C, A> UserUndeleteCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &UserUndelete) -> UserUndeleteCall<'a, C, A> { self._request = new_value.clone(); self } + /// The immutable id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The immutable id of the user pub fn user_key(mut self, new_value: &str) -> UserUndeleteCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserUndeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6627,8 +6616,8 @@ impl<'a, C, A> UserUndeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6722,7 +6711,7 @@ impl<'a, C, A> UserMakeAdminCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/makeAdmin".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -6816,32 +6805,31 @@ impl<'a, C, A> UserMakeAdminCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &UserMakeAdmin) -> UserMakeAdminCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the user as admin + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user as admin pub fn user_key(mut self, new_value: &str) -> UserMakeAdminCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserMakeAdminCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6871,8 +6859,8 @@ impl<'a, C, A> UserMakeAdminCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6967,7 +6955,7 @@ impl<'a, C, A> UserPatchCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -7071,32 +7059,31 @@ impl<'a, C, A> UserPatchCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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: &User) -> UserPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the user. If Id, it should match with id of user object + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user. If Id, it should match with id of user object pub fn user_key(mut self, new_value: &str) -> UserPatchCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7126,8 +7113,8 @@ impl<'a, C, A> UserPatchCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7280,7 +7267,7 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/admin/directory/v1/users/watch".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -7360,118 +7347,105 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> UserWatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *view type* query property to the given value. - /// - /// /// Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. + /// + /// Sets the *view type* query property to the given value. pub fn view_type(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { self._view_type = Some(new_value.to_string()); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Whether to return results in ascending or descending order. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *show deleted* query property to the given value. - /// - /// /// If set to true retrieves the list of deleted users. Default is false + /// + /// Sets the *show deleted* query property to the given value. pub fn show_deleted(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { self._show_deleted = Some(new_value.to_string()); self } - /// Sets the *query* query property to the given value. - /// - /// /// Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users + /// + /// Sets the *query* query property to the given value. pub fn query(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { self._query = Some(new_value.to_string()); self } - /// Sets the *projection* query property to the given value. - /// - /// /// What subset of fields to fetch for this user. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token to specify next page in the list + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *order by* query property to the given value. - /// - /// /// Column to use for sorting results + /// + /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. Default is 100. Max allowed is 500 + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> UserWatchCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *event* query property to the given value. - /// - /// /// Event on which subscription is intended (if subscribing) + /// + /// Sets the *event* query property to the given value. pub fn event(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { self._event = Some(new_value.to_string()); self } - /// Sets the *domain* query property to the given value. - /// - /// /// Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead. + /// + /// Sets the *domain* query property to the given value. pub fn domain(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { self._domain = Some(new_value.to_string()); self } - /// Sets the *customer* query property to the given value. - /// - /// /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. + /// + /// Sets the *customer* query property to the given value. pub fn customer(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { self._customer = Some(new_value.to_string()); self } - /// Sets the *custom field mask* query property to the given value. - /// - /// /// Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. + /// + /// Sets the *custom field mask* query property to the given value. pub fn custom_field_mask(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { self._custom_field_mask = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserWatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7501,8 +7475,8 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7589,7 +7563,7 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -7675,23 +7649,22 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa } + /// Email or immutable Id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserDeleteCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7721,8 +7694,8 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7817,7 +7790,7 @@ impl<'a, C, A> UserPhotoUpdateCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -7921,32 +7894,31 @@ impl<'a, C, A> UserPhotoUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &UserPhoto) -> UserPhotoUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserPhotoUpdateCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserPhotoUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7976,8 +7948,8 @@ impl<'a, C, A> UserPhotoUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8080,7 +8052,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -8176,47 +8148,43 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// Email or immutable Id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserGetCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *view type* query property to the given value. - /// - /// /// Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. + /// + /// Sets the *view type* query property to the given value. pub fn view_type(mut self, new_value: &str) -> UserGetCall<'a, C, A> { self._view_type = Some(new_value.to_string()); self } - /// Sets the *projection* query property to the given value. - /// - /// /// What subset of fields to fetch for this user. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> UserGetCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *custom field mask* query property to the given value. - /// - /// /// Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. + /// + /// Sets the *custom field mask* query property to the given value. pub fn custom_field_mask(mut self, new_value: &str) -> UserGetCall<'a, C, A> { self._custom_field_mask = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8246,8 +8214,8 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8342,7 +8310,7 @@ impl<'a, C, A> UserAliaseInsertCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -8446,32 +8414,31 @@ impl<'a, C, A> UserAliaseInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Alias) -> UserAliaseInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserAliaseInsertCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserAliaseInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8501,8 +8468,8 @@ impl<'a, C, A> UserAliaseInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8648,7 +8615,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/admin/directory/v1/users".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserReadonly.as_ref().to_string(), ()); } @@ -8720,109 +8687,96 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut } - /// Sets the *view type* query property to the given value. - /// - /// /// Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. + /// + /// Sets the *view type* query property to the given value. pub fn view_type(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._view_type = Some(new_value.to_string()); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Whether to return results in ascending or descending order. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *show deleted* query property to the given value. - /// - /// /// If set to true retrieves the list of deleted users. Default is false + /// + /// Sets the *show deleted* query property to the given value. pub fn show_deleted(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._show_deleted = Some(new_value.to_string()); self } - /// Sets the *query* query property to the given value. - /// - /// /// Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users + /// + /// Sets the *query* query property to the given value. pub fn query(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._query = Some(new_value.to_string()); self } - /// Sets the *projection* query property to the given value. - /// - /// /// What subset of fields to fetch for this user. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token to specify next page in the list + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *order by* query property to the given value. - /// - /// /// Column to use for sorting results + /// + /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. Default is 100. Max allowed is 500 + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> UserListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *event* query property to the given value. - /// - /// /// Event on which subscription is intended (if subscribing) + /// + /// Sets the *event* query property to the given value. pub fn event(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._event = Some(new_value.to_string()); self } - /// Sets the *domain* query property to the given value. - /// - /// /// Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead. + /// + /// Sets the *domain* query property to the given value. pub fn domain(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._domain = Some(new_value.to_string()); self } - /// Sets the *customer* query property to the given value. - /// - /// /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. + /// + /// Sets the *customer* query property to the given value. pub fn customer(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._customer = Some(new_value.to_string()); self } - /// Sets the *custom field mask* query property to the given value. - /// - /// /// Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. + /// + /// Sets the *custom field mask* query property to the given value. pub fn custom_field_mask(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._custom_field_mask = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8852,8 +8806,8 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8942,7 +8896,7 @@ impl<'a, C, A> UserAliaseDeleteCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases/{alias}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey"), ("{alias}", "alias")].iter() { @@ -9028,33 +8982,32 @@ impl<'a, C, A> UserAliaseDeleteCall<'a, C, A> where C: BorrowMut, } + /// Email or immutable Id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserAliaseDeleteCall<'a, C, A> { self._user_key = new_value.to_string(); self } + /// The alias to be removed + /// /// Sets the *alias* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The alias to be removed pub fn alias(mut self, new_value: &str) -> UserAliaseDeleteCall<'a, C, A> { self._alias = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserAliaseDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9084,8 +9037,8 @@ impl<'a, C, A> UserAliaseDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9180,7 +9133,7 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -9284,32 +9237,31 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &User) -> UserUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the user. If Id, it should match with id of user object + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user. If Id, it should match with id of user object pub fn user_key(mut self, new_value: &str) -> UserUpdateCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9339,8 +9291,8 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9440,7 +9392,7 @@ impl<'a, C, A> UserAliaseWatchCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases/watch".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -9544,40 +9496,38 @@ impl<'a, C, A> UserAliaseWatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> UserAliaseWatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserAliaseWatchCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *event* query property to the given value. - /// - /// /// Event on which subscription is intended (if subscribing) + /// + /// Sets the *event* query property to the given value. pub fn event(mut self, new_value: &str) -> UserAliaseWatchCall<'a, C, A> { self._event = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserAliaseWatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9607,8 +9557,8 @@ impl<'a, C, A> UserAliaseWatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9701,7 +9651,7 @@ impl<'a, C, A> UserAliaseListCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserAliaReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -9797,31 +9747,29 @@ impl<'a, C, A> UserAliaseListCall<'a, C, A> where C: BorrowMut, A } + /// Email or immutable Id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserAliaseListCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *event* query property to the given value. - /// - /// /// Event on which subscription is intended (if subscribing) + /// + /// Sets the *event* query property to the given value. pub fn event(mut self, new_value: &str) -> UserAliaseListCall<'a, C, A> { self._event = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserAliaseListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9851,8 +9799,8 @@ impl<'a, C, A> UserAliaseListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserAliaReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9940,7 +9888,7 @@ impl<'a, C, A> UserPhotoGetCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -10036,23 +9984,22 @@ impl<'a, C, A> UserPhotoGetCall<'a, C, A> where C: BorrowMut, A: } + /// Email or immutable Id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserPhotoGetCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserPhotoGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10082,8 +10029,8 @@ impl<'a, C, A> UserPhotoGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10178,7 +10125,7 @@ impl<'a, C, A> UserPhotoPatchCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -10282,32 +10229,31 @@ impl<'a, C, A> UserPhotoPatchCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &UserPhoto) -> UserPhotoPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserPhotoPatchCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserPhotoPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10337,8 +10283,8 @@ impl<'a, C, A> UserPhotoPatchCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10427,7 +10373,7 @@ impl<'a, C, A> MobiledeviceDeleteCall<'a, C, A> where C: BorrowMut MobiledeviceDeleteCall<'a, C, A> where C: BorrowMut MobiledeviceDeleteCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Immutable id of Mobile Device + /// /// Sets the *resource id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of Mobile Device pub fn resource_id(mut self, new_value: &str) -> MobiledeviceDeleteCall<'a, C, A> { self._resource_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MobiledeviceDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10569,8 +10514,8 @@ impl<'a, C, A> MobiledeviceDeleteCall<'a, C, A> where C: BorrowMut MobiledeviceGetCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryDeviceMobileReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId"), ("{resourceId}", "resourceId")].iter() { @@ -10761,41 +10706,39 @@ impl<'a, C, A> MobiledeviceGetCall<'a, C, A> where C: BorrowMut, } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> MobiledeviceGetCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Immutable id of Mobile Device + /// /// Sets the *resource id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of Mobile Device pub fn resource_id(mut self, new_value: &str) -> MobiledeviceGetCall<'a, C, A> { self._resource_id = new_value.to_string(); self } - /// Sets the *projection* query property to the given value. - /// - /// /// Restrict information returned to a set of selected fields. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> MobiledeviceGetCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MobiledeviceGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10825,8 +10768,8 @@ impl<'a, C, A> MobiledeviceGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryDeviceMobileReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10944,7 +10887,7 @@ impl<'a, C, A> MobiledeviceListCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryDeviceMobileReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId")].iter() { @@ -11040,71 +10983,64 @@ impl<'a, C, A> MobiledeviceListCall<'a, C, A> where C: BorrowMut, } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, A> { self._customer_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Whether to return results in ascending or descending order. Only of use when orderBy is also used + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *query* query property to the given value. - /// - /// /// Search string in the format given at http://support.google.com/a/bin/answer.py?hl=en&answer=1408863#search + /// + /// Sets the *query* query property to the given value. pub fn query(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, A> { self._query = Some(new_value.to_string()); self } - /// Sets the *projection* query property to the given value. - /// - /// /// Restrict information returned to a set of selected fields. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token to specify next page in the list + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *order by* query property to the given value. - /// - /// /// Column to use for sorting results + /// + /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. Default is 100 + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> MobiledeviceListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MobiledeviceListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11134,8 +11070,8 @@ impl<'a, C, A> MobiledeviceListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryDeviceMobileReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11231,7 +11167,7 @@ impl<'a, C, A> MobiledeviceActionCall<'a, C, A> where C: BorrowMut MobiledeviceActionCall<'a, C, A> where C: BorrowMut MobiledeviceActionCall<'a, C, A> { self._request = new_value.clone(); self } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> MobiledeviceActionCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Immutable id of Mobile Device + /// /// Sets the *resource id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of Mobile Device pub fn resource_id(mut self, new_value: &str) -> MobiledeviceActionCall<'a, C, A> { self._resource_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MobiledeviceActionCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11390,8 +11325,8 @@ impl<'a, C, A> MobiledeviceActionCall<'a, C, A> where C: BorrowMut MemberUpdateCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey"), ("{memberKey}", "memberKey")].iter() { @@ -11592,42 +11527,41 @@ impl<'a, C, A> MemberUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Member) -> MemberUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the group. If Id, it should match with id of group object + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group. If Id, it should match with id of group object pub fn group_key(mut self, new_value: &str) -> MemberUpdateCall<'a, C, A> { self._group_key = new_value.to_string(); self } + /// Email or immutable Id of the user. If Id, it should match with id of member object + /// /// Sets the *member key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user. If Id, it should match with id of member object pub fn member_key(mut self, new_value: &str) -> MemberUpdateCall<'a, C, A> { self._member_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MemberUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11657,8 +11591,8 @@ impl<'a, C, A> MemberUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroup`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11748,7 +11682,7 @@ impl<'a, C, A> MemberGetCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroupMemberReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey"), ("{memberKey}", "memberKey")].iter() { @@ -11844,33 +11778,32 @@ impl<'a, C, A> MemberGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// Email or immutable Id of the group + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> MemberGetCall<'a, C, A> { self._group_key = new_value.to_string(); self } + /// Email or immutable Id of the member + /// /// Sets the *member key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the member pub fn member_key(mut self, new_value: &str) -> MemberGetCall<'a, C, A> { self._member_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MemberGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11900,8 +11833,8 @@ impl<'a, C, A> MemberGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroupMemberReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11996,7 +11929,7 @@ impl<'a, C, A> MemberInsertCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey")].iter() { @@ -12100,32 +12033,31 @@ impl<'a, C, A> MemberInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Member) -> MemberInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the group + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> MemberInsertCall<'a, C, A> { self._group_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MemberInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12155,8 +12087,8 @@ impl<'a, C, A> MemberInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroup`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12253,7 +12185,7 @@ impl<'a, C, A> MemberPatchCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey"), ("{memberKey}", "memberKey")].iter() { @@ -12357,42 +12289,41 @@ impl<'a, C, A> MemberPatchCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Member) -> MemberPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the group. If Id, it should match with id of group object + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group. If Id, it should match with id of group object pub fn group_key(mut self, new_value: &str) -> MemberPatchCall<'a, C, A> { self._group_key = new_value.to_string(); self } + /// Email or immutable Id of the user. If Id, it should match with id of member object + /// /// Sets the *member key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the user. If Id, it should match with id of member object pub fn member_key(mut self, new_value: &str) -> MemberPatchCall<'a, C, A> { self._member_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MemberPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12422,8 +12353,8 @@ impl<'a, C, A> MemberPatchCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroup`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12512,7 +12443,7 @@ impl<'a, C, A> MemberDeleteCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey"), ("{memberKey}", "memberKey")].iter() { @@ -12598,33 +12529,32 @@ impl<'a, C, A> MemberDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// Email or immutable Id of the group + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> MemberDeleteCall<'a, C, A> { self._group_key = new_value.to_string(); self } + /// Email or immutable Id of the member + /// /// Sets the *member key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the member pub fn member_key(mut self, new_value: &str) -> MemberDeleteCall<'a, C, A> { self._member_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MemberDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12654,8 +12584,8 @@ impl<'a, C, A> MemberDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroup`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12758,7 +12688,7 @@ impl<'a, C, A> MemberListCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroupMemberReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey")].iter() { @@ -12854,47 +12784,43 @@ impl<'a, C, A> MemberListCall<'a, C, A> where C: BorrowMut, A: oa } + /// Email or immutable Id of the group + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> MemberListCall<'a, C, A> { self._group_key = new_value.to_string(); self } - /// Sets the *roles* query property to the given value. - /// - /// /// Comma separated role values to filter list results on. + /// + /// Sets the *roles* query property to the given value. pub fn roles(mut self, new_value: &str) -> MemberListCall<'a, C, A> { self._roles = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token to specify next page in the list + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> MemberListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. Default is 200 + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> MemberListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MemberListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12924,8 +12850,8 @@ impl<'a, C, A> MemberListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroupMemberReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13028,7 +12954,7 @@ impl<'a, C, A> NotificationListCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/notifications".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryNotification.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customer}", "customer")].iter() { @@ -13124,47 +13050,43 @@ impl<'a, C, A> NotificationListCall<'a, C, A> where C: BorrowMut, } + /// The unique ID for the customer's Google account. + /// /// Sets the *customer* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The unique ID for the customer's Google account. pub fn customer(mut self, new_value: &str) -> NotificationListCall<'a, C, A> { self._customer = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token to specify the page of results to retrieve. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> NotificationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of notifications to return per page. The default is 100. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> NotificationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The ISO 639-1 code of the language notifications are returned in. The default is English (en). + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> NotificationListCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> NotificationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13194,8 +13116,8 @@ impl<'a, C, A> NotificationListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryNotification`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13284,7 +13206,7 @@ impl<'a, C, A> NotificationDeleteCall<'a, C, A> where C: BorrowMut NotificationDeleteCall<'a, C, A> where C: BorrowMut NotificationDeleteCall<'a, C, A> { self._customer = new_value.to_string(); self } + /// The unique ID of the notification. + /// /// Sets the *notification id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The unique ID of the notification. pub fn notification_id(mut self, new_value: &str) -> NotificationDeleteCall<'a, C, A> { self._notification_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> NotificationDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13426,8 +13347,8 @@ impl<'a, C, A> NotificationDeleteCall<'a, C, A> where C: BorrowMut NotificationPatchCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/notifications/{notificationId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryNotification.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customer}", "customer"), ("{notificationId}", "notificationId")].iter() { @@ -13628,42 +13549,41 @@ impl<'a, C, A> NotificationPatchCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &Notification) -> NotificationPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The unique ID for the customer's Google account. + /// /// Sets the *customer* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The unique ID for the customer's Google account. pub fn customer(mut self, new_value: &str) -> NotificationPatchCall<'a, C, A> { self._customer = new_value.to_string(); self } + /// The unique ID of the notification. + /// /// Sets the *notification id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The unique ID of the notification. pub fn notification_id(mut self, new_value: &str) -> NotificationPatchCall<'a, C, A> { self._notification_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> NotificationPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13693,8 +13613,8 @@ impl<'a, C, A> NotificationPatchCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryNotification`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13791,7 +13711,7 @@ impl<'a, C, A> NotificationUpdateCall<'a, C, A> where C: BorrowMut NotificationUpdateCall<'a, C, A> where C: BorrowMut NotificationUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The unique ID for the customer's Google account. + /// /// Sets the *customer* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The unique ID for the customer's Google account. pub fn customer(mut self, new_value: &str) -> NotificationUpdateCall<'a, C, A> { self._customer = new_value.to_string(); self } + /// The unique ID of the notification. + /// /// Sets the *notification id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The unique ID of the notification. pub fn notification_id(mut self, new_value: &str) -> NotificationUpdateCall<'a, C, A> { self._notification_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> NotificationUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13960,8 +13879,8 @@ impl<'a, C, A> NotificationUpdateCall<'a, C, A> where C: BorrowMut NotificationGetCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/notifications/{notificationId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryNotification.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customer}", "customer"), ("{notificationId}", "notificationId")].iter() { @@ -14147,33 +14066,32 @@ impl<'a, C, A> NotificationGetCall<'a, C, A> where C: BorrowMut, } + /// The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. + /// /// Sets the *customer* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. pub fn customer(mut self, new_value: &str) -> NotificationGetCall<'a, C, A> { self._customer = new_value.to_string(); self } + /// The unique ID of the notification. + /// /// Sets the *notification id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The unique ID of the notification. pub fn notification_id(mut self, new_value: &str) -> NotificationGetCall<'a, C, A> { self._notification_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> NotificationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14203,8 +14121,8 @@ impl<'a, C, A> NotificationGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryNotification`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14418,71 +14336,64 @@ impl<'a, C, A> ChromeosdeviceListCall<'a, C, A> where C: BorrowMut ChromeosdeviceListCall<'a, C, A> { self._customer_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Whether to return results in ascending or descending order. Only of use when orderBy is also used + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> ChromeosdeviceListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *query* query property to the given value. - /// - /// /// Search string in the format given at http://support.google.com/chromeos/a/bin/answer.py?hl=en&answer=1698333 + /// + /// Sets the *query* query property to the given value. pub fn query(mut self, new_value: &str) -> ChromeosdeviceListCall<'a, C, A> { self._query = Some(new_value.to_string()); self } - /// Sets the *projection* query property to the given value. - /// - /// /// Restrict information returned to a set of selected fields. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> ChromeosdeviceListCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token to specify next page in the list + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ChromeosdeviceListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *order by* query property to the given value. - /// - /// /// Column to use for sorting results + /// + /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> ChromeosdeviceListCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. Default is 100 + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ChromeosdeviceListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChromeosdeviceListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14512,8 +14423,8 @@ impl<'a, C, A> ChromeosdeviceListCall<'a, C, A> where C: BorrowMut ChromeosdevicePatchCall<'a, C, A> where C: BorrowMut ChromeosdevicePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> ChromeosdevicePatchCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Immutable id of Chrome OS Device + /// /// Sets the *device id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of Chrome OS Device pub fn device_id(mut self, new_value: &str) -> ChromeosdevicePatchCall<'a, C, A> { self._device_id = new_value.to_string(); self } - /// Sets the *projection* query property to the given value. - /// - /// /// Restrict information returned to a set of selected fields. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> ChromeosdevicePatchCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChromeosdevicePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14792,8 +14701,8 @@ impl<'a, C, A> ChromeosdevicePatchCall<'a, C, A> where C: BorrowMut ChromeosdeviceGetCall<'a, C, A> where C: BorrowMut } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> ChromeosdeviceGetCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Immutable id of Chrome OS Device + /// /// Sets the *device id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of Chrome OS Device pub fn device_id(mut self, new_value: &str) -> ChromeosdeviceGetCall<'a, C, A> { self._device_id = new_value.to_string(); self } - /// Sets the *projection* query property to the given value. - /// - /// /// Restrict information returned to a set of selected fields. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> ChromeosdeviceGetCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChromeosdeviceGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15048,8 +14955,8 @@ impl<'a, C, A> ChromeosdeviceGetCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryDeviceChromeoReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15255,50 +15162,48 @@ impl<'a, C, A> ChromeosdeviceUpdateCall<'a, C, A> where C: BorrowMut ChromeosdeviceUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> ChromeosdeviceUpdateCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Immutable id of Chrome OS Device + /// /// Sets the *device id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of Chrome OS Device pub fn device_id(mut self, new_value: &str) -> ChromeosdeviceUpdateCall<'a, C, A> { self._device_id = new_value.to_string(); self } - /// Sets the *projection* query property to the given value. - /// - /// /// Restrict information returned to a set of selected fields. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> ChromeosdeviceUpdateCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChromeosdeviceUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15328,8 +15233,8 @@ impl<'a, C, A> ChromeosdeviceUpdateCall<'a, C, A> where C: BorrowMut VerificationCodeGenerateCall<'a, C, A> where C: BorrowMut VerificationCodeGenerateCall<'a, C, A> where C: BorrowMut VerificationCodeGenerateCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VerificationCodeGenerateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15548,8 +15452,8 @@ impl<'a, C, A> VerificationCodeGenerateCall<'a, C, A> where C: BorrowMut VerificationCodeInvalidateCall<'a, C, A> where C: BorrowMut VerificationCodeInvalidateCall<'a, C, A> where C: BorrowMut VerificationCodeInvalidateCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VerificationCodeInvalidateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15768,8 +15671,8 @@ impl<'a, C, A> VerificationCodeInvalidateCall<'a, C, A> where C: BorrowMut VerificationCodeListCall<'a, C, A> where C: BorrowMut VerificationCodeListCall<'a, C, A> where C: BorrowMut VerificationCodeListCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VerificationCodeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15999,8 +15901,8 @@ impl<'a, C, A> VerificationCodeListCall<'a, C, A> where C: BorrowMut GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroupReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey")].iter() { @@ -16184,23 +16086,22 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Email or immutable Id of the group + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> GroupGetCall<'a, C, A> { self._group_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GroupGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16230,8 +16131,8 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroupReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16342,7 +16243,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/admin/directory/v1/groups".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroupReadonly.as_ref().to_string(), ()); } @@ -16414,53 +16315,47 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau } - /// Sets the *user key* query property to the given value. - /// - /// /// Email or immutable Id of the user if only those groups are to be listed, the given user is a member of. If Id, it should match with id of user object + /// + /// Sets the *user key* query property to the given value. pub fn user_key(mut self, new_value: &str) -> GroupListCall<'a, C, A> { self._user_key = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token to specify next page in the list + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> GroupListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. Default is 200 + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> GroupListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *domain* query property to the given value. - /// - /// /// Name of the domain. Fill this field to get groups from only this domain. To return all groups in a multi-domain fill customer field instead. + /// + /// Sets the *domain* query property to the given value. pub fn domain(mut self, new_value: &str) -> GroupListCall<'a, C, A> { self._domain = Some(new_value.to_string()); self } - /// Sets the *customer* query property to the given value. - /// - /// /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain. + /// + /// Sets the *customer* query property to the given value. pub fn customer(mut self, new_value: &str) -> GroupListCall<'a, C, A> { self._customer = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GroupListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16490,8 +16385,8 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroupReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16579,7 +16474,7 @@ impl<'a, C, A> GroupAliaseListCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/aliases".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroupReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey")].iter() { @@ -16675,23 +16570,22 @@ impl<'a, C, A> GroupAliaseListCall<'a, C, A> where C: BorrowMut, } + /// Email or immutable Id of the group + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> GroupAliaseListCall<'a, C, A> { self._group_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GroupAliaseListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16721,8 +16615,8 @@ impl<'a, C, A> GroupAliaseListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroupReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16817,7 +16711,7 @@ impl<'a, C, A> GroupPatchCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey")].iter() { @@ -16921,32 +16815,31 @@ impl<'a, C, A> GroupPatchCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Group) -> GroupPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the group. If Id, it should match with id of group object + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group. If Id, it should match with id of group object pub fn group_key(mut self, new_value: &str) -> GroupPatchCall<'a, C, A> { self._group_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GroupPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16976,8 +16869,8 @@ impl<'a, C, A> GroupPatchCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroup`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17072,7 +16965,7 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey")].iter() { @@ -17176,32 +17069,31 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Group) -> GroupUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the group. If Id, it should match with id of group object + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group. If Id, it should match with id of group object pub fn group_key(mut self, new_value: &str) -> GroupUpdateCall<'a, C, A> { self._group_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GroupUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17231,8 +17123,8 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroup`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17319,7 +17211,7 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey")].iter() { @@ -17405,23 +17297,22 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o } + /// Email or immutable Id of the group + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> GroupDeleteCall<'a, C, A> { self._group_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GroupDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17451,8 +17342,8 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroup`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17547,7 +17438,7 @@ impl<'a, C, A> GroupAliaseInsertCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/aliases".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey")].iter() { @@ -17651,32 +17542,31 @@ impl<'a, C, A> GroupAliaseInsertCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &Alias) -> GroupAliaseInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Email or immutable Id of the group + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> GroupAliaseInsertCall<'a, C, A> { self._group_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GroupAliaseInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17706,8 +17596,8 @@ impl<'a, C, A> GroupAliaseInsertCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroup`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17796,7 +17686,7 @@ impl<'a, C, A> GroupAliaseDeleteCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/aliases/{alias}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{groupKey}", "groupKey"), ("{alias}", "alias")].iter() { @@ -17882,33 +17772,32 @@ impl<'a, C, A> GroupAliaseDeleteCall<'a, C, A> where C: BorrowMut } + /// Email or immutable Id of the group + /// /// Sets the *group key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> GroupAliaseDeleteCall<'a, C, A> { self._group_key = new_value.to_string(); self } + /// The alias to be removed + /// /// Sets the *alias* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The alias to be removed pub fn alias(mut self, new_value: &str) -> GroupAliaseDeleteCall<'a, C, A> { self._alias = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GroupAliaseDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17938,8 +17827,8 @@ impl<'a, C, A> GroupAliaseDeleteCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroup`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18032,7 +17921,7 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/admin/directory/v1/groups".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } @@ -18112,22 +18001,21 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Group) -> GroupInsertCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GroupInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18157,8 +18045,8 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryGroup`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18247,7 +18135,7 @@ impl<'a, C, A> AspDeleteCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/asps/{codeId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey"), ("{codeId}", "codeId")].iter() { @@ -18333,33 +18221,32 @@ impl<'a, C, A> AspDeleteCall<'a, C, A> where C: BorrowMut, A: oau } + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> AspDeleteCall<'a, C, A> { self._user_key = new_value.to_string(); self } + /// The unique ID of the ASP to be deleted. + /// /// Sets the *code id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The unique ID of the ASP to be deleted. pub fn code_id(mut self, new_value: i32) -> AspDeleteCall<'a, C, A> { self._code_id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AspDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18389,8 +18276,8 @@ impl<'a, C, A> AspDeleteCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserSecurity`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18478,7 +18365,7 @@ impl<'a, C, A> AspListCall<'a, C, A> where C: BorrowMut, A: oauth let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/asps".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey")].iter() { @@ -18574,23 +18461,22 @@ impl<'a, C, A> AspListCall<'a, C, A> where C: BorrowMut, A: oauth } + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> AspListCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AspListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18620,8 +18506,8 @@ impl<'a, C, A> AspListCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserSecurity`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18711,7 +18597,7 @@ impl<'a, C, A> AspGetCall<'a, C, A> where C: BorrowMut, A: oauth2 let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/asps/{codeId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userKey}", "userKey"), ("{codeId}", "codeId")].iter() { @@ -18807,33 +18693,32 @@ impl<'a, C, A> AspGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> AspGetCall<'a, C, A> { self._user_key = new_value.to_string(); self } + /// The unique ID of the ASP. + /// /// Sets the *code id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The unique ID of the ASP. pub fn code_id(mut self, new_value: i32) -> AspGetCall<'a, C, A> { self._code_id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AspGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18863,8 +18748,8 @@ impl<'a, C, A> AspGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserSecurity`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18952,7 +18837,7 @@ impl<'a, C, A> SchemaListCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserschemaReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId")].iter() { @@ -19048,23 +18933,22 @@ impl<'a, C, A> SchemaListCall<'a, C, A> where C: BorrowMut, A: oa } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaListCall<'a, C, A> { self._customer_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SchemaListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19094,8 +18978,8 @@ impl<'a, C, A> SchemaListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserschemaReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -19185,7 +19069,7 @@ impl<'a, C, A> SchemaGetCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserschemaReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId"), ("{schemaKey}", "schemaKey")].iter() { @@ -19281,33 +19165,32 @@ impl<'a, C, A> SchemaGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaGetCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Name or immutable Id of the schema + /// /// Sets the *schema key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name or immutable Id of the schema pub fn schema_key(mut self, new_value: &str) -> SchemaGetCall<'a, C, A> { self._schema_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SchemaGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19337,8 +19220,8 @@ impl<'a, C, A> SchemaGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserschemaReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -19435,7 +19318,7 @@ impl<'a, C, A> SchemaPatchCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserschema.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId"), ("{schemaKey}", "schemaKey")].iter() { @@ -19539,42 +19422,41 @@ impl<'a, C, A> SchemaPatchCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Schema) -> SchemaPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaPatchCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Name or immutable Id of the schema. + /// /// Sets the *schema key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name or immutable Id of the schema. pub fn schema_key(mut self, new_value: &str) -> SchemaPatchCall<'a, C, A> { self._schema_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SchemaPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19604,8 +19486,8 @@ impl<'a, C, A> SchemaPatchCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserschema`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -19700,7 +19582,7 @@ impl<'a, C, A> SchemaInsertCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserschema.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId")].iter() { @@ -19804,32 +19686,31 @@ impl<'a, C, A> SchemaInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Schema) -> SchemaInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaInsertCall<'a, C, A> { self._customer_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SchemaInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19859,8 +19740,8 @@ impl<'a, C, A> SchemaInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserschema`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -19949,7 +19830,7 @@ impl<'a, C, A> SchemaDeleteCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserschema.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId"), ("{schemaKey}", "schemaKey")].iter() { @@ -20035,33 +19916,32 @@ impl<'a, C, A> SchemaDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaDeleteCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Name or immutable Id of the schema + /// /// Sets the *schema key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name or immutable Id of the schema pub fn schema_key(mut self, new_value: &str) -> SchemaDeleteCall<'a, C, A> { self._schema_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SchemaDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -20091,8 +19971,8 @@ impl<'a, C, A> SchemaDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserschema`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -20189,7 +20069,7 @@ impl<'a, C, A> SchemaUpdateCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DirectoryDeviceChromeo.as_ref().to_string(), ()); + self._scopes.insert(Scope::DirectoryUserschema.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{customerId}", "customerId"), ("{schemaKey}", "schemaKey")].iter() { @@ -20293,42 +20173,41 @@ impl<'a, C, A> SchemaUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Schema) -> SchemaUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Immutable id of the Google Apps account + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaUpdateCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Name or immutable Id of the schema. + /// /// Sets the *schema key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name or immutable Id of the schema. pub fn schema_key(mut self, new_value: &str) -> SchemaUpdateCall<'a, C, A> { self._schema_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SchemaUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -20358,8 +20237,8 @@ impl<'a, C, A> SchemaUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DirectoryUserschema`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/admin1_reports/README.md b/gen/admin1_reports/README.md index 0e3c4766c3..6b5a68ee9e 100644 --- a/gen/admin1_reports/README.md +++ b/gen/admin1_reports/README.md @@ -123,16 +123,18 @@ let result = hub.activities().watch(&req, "userKey", "applicationName") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/admin1_reports/src/cmn.rs b/gen/admin1_reports/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/admin1_reports/src/cmn.rs +++ b/gen/admin1_reports/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/admin1_reports/src/lib.rs b/gen/admin1_reports/src/lib.rs index 4b4de92ba3..f21cf482ee 100644 --- a/gen/admin1_reports/src/lib.rs +++ b/gen/admin1_reports/src/lib.rs @@ -124,16 +124,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -309,16 +311,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -378,7 +382,7 @@ impl<'a, C, A> Reports /// /// * [list activities](struct.ActivityListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Activities { /// Token for retrieving the next page #[serde(rename="nextPageToken")] @@ -398,7 +402,7 @@ impl ResponseResult for Activities {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UsageReportsWarningsData { /// Key associated with a key-value pair to give detailed information on the warning. pub key: String, @@ -414,7 +418,7 @@ impl Part for UsageReportsWarningsData {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UsageReport { /// The date to which the record belongs. pub date: String, @@ -435,7 +439,7 @@ impl Part for UsageReport {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UsageReportParameters { /// Nested message value of the parameter. #[serde(rename="msgValue")] @@ -464,7 +468,7 @@ impl Part for UsageReportParameters {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityActor { /// Obfuscated user id of the user. #[serde(rename="profileId")] @@ -486,7 +490,7 @@ impl Part for ActivityActor {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityId { /// Application name to which the event belongs. #[serde(rename="applicationName")] @@ -509,7 +513,7 @@ impl Part for ActivityId {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UsageReportsWarnings { /// Human readable message for the warning. pub message: String, @@ -533,7 +537,7 @@ impl Part for UsageReportsWarnings {} /// * [get user usage report](struct.UserUsageReportGetCall.html) (response) /// * [get customer usage reports](struct.CustomerUsageReportGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UsageReports { /// Token for retrieving the next page #[serde(rename="nextPageToken")] @@ -556,7 +560,7 @@ impl ResponseResult for UsageReports {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Activity { /// Kind of resource this is. pub kind: String, @@ -583,7 +587,7 @@ impl Part for Activity {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityEventsParameters { /// Boolean value of the parameter. #[serde(rename="boolValue")] @@ -611,7 +615,7 @@ impl Part for ActivityEventsParameters {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityEvents { /// Type of event. #[serde(rename="type")] @@ -630,7 +634,7 @@ impl Part for ActivityEvents {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UsageReportEntity { /// Obfuscated user id for the record. #[serde(rename="profileId")] @@ -1130,22 +1134,21 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> ChannelStopCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChannelStopCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1175,8 +1178,8 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ReportAuditReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1417,106 +1420,97 @@ impl<'a, C, A> ActivityWatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> ActivityWatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. pub fn user_key(mut self, new_value: &str) -> ActivityWatchCall<'a, C, A> { self._user_key = new_value.to_string(); self } + /// Application name for which the events are to be retrieved. + /// /// Sets the *application name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Application name for which the events are to be retrieved. pub fn application_name(mut self, new_value: &str) -> ActivityWatchCall<'a, C, A> { self._application_name = new_value.to_string(); self } - /// Sets the *start time* query property to the given value. - /// - /// /// Return events which occured at or after this time. + /// + /// Sets the *start time* query property to the given value. pub fn start_time(mut self, new_value: &str) -> ActivityWatchCall<'a, C, A> { self._start_time = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token to specify next page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ActivityWatchCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Number of activity records to be shown in each page. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ActivityWatchCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filters* query property to the given value. - /// - /// /// Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],... + /// + /// Sets the *filters* query property to the given value. pub fn filters(mut self, new_value: &str) -> ActivityWatchCall<'a, C, A> { self._filters = Some(new_value.to_string()); self } - /// Sets the *event name* query property to the given value. - /// - /// /// Name of the event being queried. + /// + /// Sets the *event name* query property to the given value. pub fn event_name(mut self, new_value: &str) -> ActivityWatchCall<'a, C, A> { self._event_name = Some(new_value.to_string()); self } - /// Sets the *end time* query property to the given value. - /// - /// /// Return events which occured at or before this time. + /// + /// Sets the *end time* query property to the given value. pub fn end_time(mut self, new_value: &str) -> ActivityWatchCall<'a, C, A> { self._end_time = Some(new_value.to_string()); self } - /// Sets the *customer id* query property to the given value. - /// - /// /// Represents the customer for which the data is to be fetched. + /// + /// Sets the *customer id* query property to the given value. pub fn customer_id(mut self, new_value: &str) -> ActivityWatchCall<'a, C, A> { self._customer_id = Some(new_value.to_string()); self } - /// Sets the *actor ip address* query property to the given value. - /// - /// /// IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses. + /// + /// Sets the *actor ip address* query property to the given value. pub fn actor_ip_address(mut self, new_value: &str) -> ActivityWatchCall<'a, C, A> { self._actor_ip_address = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ActivityWatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1546,8 +1540,8 @@ impl<'a, C, A> ActivityWatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ReportAuditReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1773,97 +1767,88 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: } + /// Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. pub fn user_key(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._user_key = new_value.to_string(); self } + /// Application name for which the events are to be retrieved. + /// /// Sets the *application name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Application name for which the events are to be retrieved. pub fn application_name(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._application_name = new_value.to_string(); self } - /// Sets the *start time* query property to the given value. - /// - /// /// Return events which occured at or after this time. + /// + /// Sets the *start time* query property to the given value. pub fn start_time(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._start_time = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token to specify next page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Number of activity records to be shown in each page. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ActivityListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filters* query property to the given value. - /// - /// /// Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],... + /// + /// Sets the *filters* query property to the given value. pub fn filters(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._filters = Some(new_value.to_string()); self } - /// Sets the *event name* query property to the given value. - /// - /// /// Name of the event being queried. + /// + /// Sets the *event name* query property to the given value. pub fn event_name(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._event_name = Some(new_value.to_string()); self } - /// Sets the *end time* query property to the given value. - /// - /// /// Return events which occured at or before this time. + /// + /// Sets the *end time* query property to the given value. pub fn end_time(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._end_time = Some(new_value.to_string()); self } - /// Sets the *customer id* query property to the given value. - /// - /// /// Represents the customer for which the data is to be fetched. + /// + /// Sets the *customer id* query property to the given value. pub fn customer_id(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._customer_id = Some(new_value.to_string()); self } - /// Sets the *actor ip address* query property to the given value. - /// - /// /// IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses. + /// + /// Sets the *actor ip address* query property to the given value. pub fn actor_ip_address(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._actor_ip_address = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ActivityListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1893,8 +1878,8 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ReportAuditReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1997,7 +1982,7 @@ impl<'a, C, A> CustomerUsageReportGetCall<'a, C, A> where C: BorrowMut CustomerUsageReportGetCall<'a, C, A> where C: BorrowMut CustomerUsageReportGetCall<'a, C, A> { self._date = new_value.to_string(); self } - /// Sets the *parameters* query property to the given value. - /// - /// /// Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2. + /// + /// Sets the *parameters* query property to the given value. pub fn parameters(mut self, new_value: &str) -> CustomerUsageReportGetCall<'a, C, A> { self._parameters = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token to specify next page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CustomerUsageReportGetCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *customer id* query property to the given value. - /// - /// /// Represents the customer for which the data is to be fetched. + /// + /// Sets the *customer id* query property to the given value. pub fn customer_id(mut self, new_value: &str) -> CustomerUsageReportGetCall<'a, C, A> { self._customer_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CustomerUsageReportGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2163,8 +2144,8 @@ impl<'a, C, A> CustomerUsageReportGetCall<'a, C, A> where C: BorrowMut UserUsageReportGetCall<'a, C, A> where C: BorrowMut UserUsageReportGetCall<'a, C, A> where C: BorrowMut UserUsageReportGetCall<'a, C, A> { self._user_key = new_value.to_string(); self } + /// Represents the date in yyyy-mm-dd format for which the data is to be fetched. + /// /// Sets the *date* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Represents the date in yyyy-mm-dd format for which the data is to be fetched. pub fn date(mut self, new_value: &str) -> UserUsageReportGetCall<'a, C, A> { self._date = new_value.to_string(); self } - /// Sets the *parameters* query property to the given value. - /// - /// /// Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2. + /// + /// Sets the *parameters* query property to the given value. pub fn parameters(mut self, new_value: &str) -> UserUsageReportGetCall<'a, C, A> { self._parameters = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token to specify next page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> UserUsageReportGetCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. Maximum allowed is 1000 + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> UserUsageReportGetCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filters* query property to the given value. - /// - /// /// Represents the set of filters including parameter operator value. + /// + /// Sets the *filters* query property to the given value. pub fn filters(mut self, new_value: &str) -> UserUsageReportGetCall<'a, C, A> { self._filters = Some(new_value.to_string()); self } - /// Sets the *customer id* query property to the given value. - /// - /// /// Represents the customer for which the data is to be fetched. + /// + /// Sets the *customer id* query property to the given value. pub fn customer_id(mut self, new_value: &str) -> UserUsageReportGetCall<'a, C, A> { self._customer_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserUsageReportGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2471,8 +2446,8 @@ impl<'a, C, A> UserUsageReportGetCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/admin2_email_migration/src/cmn.rs b/gen/admin2_email_migration/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/admin2_email_migration/src/cmn.rs +++ b/gen/admin2_email_migration/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/admin2_email_migration/src/lib.rs b/gen/admin2_email_migration/src/lib.rs index 29ccf862f8..2cff7ab799 100644 --- a/gen/admin2_email_migration/src/lib.rs +++ b/gen/admin2_email_migration/src/lib.rs @@ -109,16 +109,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -283,16 +285,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -733,32 +737,31 @@ impl<'a, C, A> MailInsertCall<'a, C, A> where C: BorrowMut, A: oa self.doit(resumeable_stream, mime_type, "resumable") } + /// /// Sets the *request* property to the given value. /// /// 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: &MailItem) -> MailInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The email or immutable id of the user + /// /// Sets the *user key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The email or immutable id of the user pub fn user_key(mut self, new_value: &str) -> MailInsertCall<'a, C, A> { self._user_key = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MailInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -788,8 +791,8 @@ impl<'a, C, A> MailInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::EmailMigration`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/adsense1d4/README.md b/gen/adsense1d4/README.md index 6395762092..a707920a8c 100644 --- a/gen/adsense1d4/README.md +++ b/gen/adsense1d4/README.md @@ -147,16 +147,18 @@ let result = hub.accounts().reports_generate("accountId", "startDate", "endDate" match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/adsense1d4/src/cmn.rs b/gen/adsense1d4/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/adsense1d4/src/cmn.rs +++ b/gen/adsense1d4/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/adsense1d4/src/lib.rs b/gen/adsense1d4/src/lib.rs index 6434c0e7b4..9287d7ff13 100644 --- a/gen/adsense1d4/src/lib.rs +++ b/gen/adsense1d4/src/lib.rs @@ -148,16 +148,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -328,16 +330,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -416,7 +420,7 @@ impl<'a, C, A> AdSense /// * [list urlchannels](struct.UrlchannelListCall.html) (response) /// * [urlchannels list accounts](struct.AccountUrlchannelListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UrlChannels { /// Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -459,7 +463,7 @@ impl ResponseResult for UrlChannels {} /// * [reports saved list accounts](struct.AccountReportSavedListCall.html) (none) /// * [urlchannels list accounts](struct.AccountUrlchannelListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Account { /// Kind of resource this is, in this case adsense#account. pub kind: String, @@ -492,7 +496,7 @@ impl ResponseResult for Account {} /// * [customchannels adunits list accounts](struct.AccountCustomchannelAdunitListCall.html) (response) /// * [adunits list customchannels](struct.CustomchannelAdunitListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdUnits { /// Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -512,7 +516,7 @@ impl ResponseResult for AdUnits {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdStyleFont { /// The family of the font. pub family: String, @@ -536,7 +540,7 @@ impl Part for AdStyleFont {} /// * [reports saved generate accounts](struct.AccountReportSavedGenerateCall.html) (response) /// * [generate reports](struct.ReportGenerateCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdsenseReportsGenerateResponse { /// The requested start date in yyyy-mm-dd format. #[serde(rename="startDate")] @@ -568,7 +572,7 @@ impl ResponseResult for AdsenseReportsGenerateResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdsenseReportsGenerateResponseHeaders { /// The currency of this column. Only present if the header type is METRIC_CURRENCY. pub currency: String, @@ -587,7 +591,7 @@ impl Part for AdsenseReportsGenerateResponseHeaders {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdUnitMobileContentAdsSettings { /// The scripting language to use for this ad unit. #[serde(rename="scriptingLanguage")] @@ -616,7 +620,7 @@ impl Part for AdUnitMobileContentAdsSettings {} /// * [alerts list accounts](struct.AccountAlertListCall.html) (response) /// * [list alerts](struct.AlertListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Alerts { /// The alerts returned in this list response. pub items: Vec, @@ -631,7 +635,7 @@ impl ResponseResult for Alerts {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SavedReport { /// Kind of resource this is, in this case adsense#savedReport. pub kind: String, @@ -648,7 +652,7 @@ impl Part for SavedReport {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdClient { /// ARC review mode this ad client is in. Empty if the client is not opted in to ARC. Possible values: POST_REVIEW, AUTOMATIC_PRE_REVIEW. #[serde(rename="arcReviewMode")] @@ -675,7 +679,7 @@ impl Part for AdClient {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdUnitContentAdsSettingsBackupOption { /// Color to use when type is set to COLOR. pub color: String, @@ -694,7 +698,7 @@ impl Part for AdUnitContentAdsSettingsBackupOption {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdUnitFeedAdsSettings { /// The minimum length an entry should be in order to have attached ads. #[serde(rename="minimumWordCount")] @@ -723,7 +727,7 @@ impl Part for AdUnitFeedAdsSettings {} /// * [payments list accounts](struct.AccountPaymentListCall.html) (response) /// * [list payments](struct.PaymentListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Payments { /// The list of Payments for the account. One or both of a) the account's most recent payment; and b) the account's upcoming payment. pub items: Vec, @@ -738,7 +742,7 @@ impl ResponseResult for Payments {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportingMetadataEntry { /// The names of the metrics which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. #[serde(rename="requiredMetrics")] @@ -768,7 +772,7 @@ impl Part for ReportingMetadataEntry {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomChannelTargetingInfo { /// The external description of the channel. pub description: String, @@ -798,7 +802,7 @@ impl Part for CustomChannelTargetingInfo {} /// * [adunits customchannels list accounts](struct.AccountAdunitCustomchannelListCall.html) (response) /// * [list customchannels](struct.CustomchannelListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomChannels { /// Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -818,7 +822,7 @@ impl ResponseResult for CustomChannels {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UrlChannel { /// Kind of resource this is, in this case adsense#urlChannel. pub kind: String, @@ -842,7 +846,7 @@ impl Part for UrlChannel {} /// * [get adunits](struct.AdunitGetCall.html) (response) /// * [adunits get accounts](struct.AccountAdunitGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdUnit { /// Status of this ad unit. Possible values are: /// NEW: Indicates that the ad unit was created within the last seven days and does not yet have any activity associated with it. @@ -890,7 +894,7 @@ impl ResponseResult for AdUnit {} /// * [list adclients](struct.AdclientListCall.html) (response) /// * [adclients list accounts](struct.AccountAdclientListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdClients { /// Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -910,7 +914,7 @@ impl ResponseResult for AdClients {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdStyle { /// The style of the corners in the ad. pub corners: String, @@ -929,7 +933,7 @@ impl Part for AdStyle {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdStyleColors { /// The color of the ad url. pub url: String, @@ -957,7 +961,7 @@ impl Part for AdStyleColors {} /// * [saved list reports](struct.ReportSavedListCall.html) (response) /// * [reports saved list accounts](struct.AccountReportSavedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SavedReports { /// Continuation token used to page through saved reports. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -983,7 +987,7 @@ impl ResponseResult for SavedReports {} /// * [savedadstyles list accounts](struct.AccountSavedadstyleListCall.html) (response) /// * [list savedadstyles](struct.SavedadstyleListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SavedAdStyles { /// Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -1009,7 +1013,7 @@ impl ResponseResult for SavedAdStyles {} /// * [list alerts](struct.AlertListCall.html) (none) /// * [delete alerts](struct.AlertDeleteCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Alert { /// Kind of resource this is, in this case adsense#alert. pub kind: Option, @@ -1040,7 +1044,7 @@ impl Resource for Alert {} /// * [customchannels get accounts](struct.AccountCustomchannelGetCall.html) (response) /// * [get customchannels](struct.CustomchannelGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomChannel { /// Kind of resource this is, in this case adsense#customChannel. pub kind: String, @@ -1068,7 +1072,7 @@ impl ResponseResult for CustomChannel {} /// /// * [list accounts](struct.AccountListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Accounts { /// Continuation token used to page through accounts. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -1088,7 +1092,7 @@ impl ResponseResult for Accounts {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdUnitContentAdsSettings { /// Type of this ad unit. #[serde(rename="type")] @@ -1114,7 +1118,7 @@ impl Part for AdUnitContentAdsSettings {} /// * [get savedadstyles](struct.SavedadstyleGetCall.html) (response) /// * [savedadstyles get accounts](struct.AccountSavedadstyleGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SavedAdStyle { /// Kind of resource this is, in this case adsense#savedAdStyle. pub kind: String, @@ -1141,7 +1145,7 @@ impl ResponseResult for SavedAdStyle {} /// * [adunits get ad code accounts](struct.AccountAdunitGetAdCodeCall.html) (response) /// * [get ad code adunits](struct.AdunitGetAdCodeCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdCode { /// The ad code snippet. #[serde(rename="adCode")] @@ -1163,7 +1167,7 @@ impl ResponseResult for AdCode {} /// * [metrics list metadata](struct.MetadataMetricListCall.html) (response) /// * [dimensions list metadata](struct.MetadataDimensionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Metadata { /// no description provided pub items: Vec, @@ -1183,7 +1187,7 @@ impl ResponseResult for Metadata {} /// /// * [list payments](struct.PaymentListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Payment { /// The currency code for the amount to be paid. #[serde(rename="paymentAmountCurrencyCode")] @@ -2522,39 +2526,36 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A } + /// Ad client for which to list URL channels. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to list URL channels. pub fn ad_client_id(mut self, new_value: &str) -> UrlchannelListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> UrlchannelListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of URL channels to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> UrlchannelListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UrlchannelListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2584,8 +2585,8 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2781,49 +2782,46 @@ impl<'a, C, A> AdunitCustomchannelListCall<'a, C, A> where C: BorrowMut AdunitCustomchannelListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Ad unit for which to list custom channels. + /// /// Sets the *ad unit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad unit for which to list custom channels. pub fn ad_unit_id(mut self, new_value: &str) -> AdunitCustomchannelListCall<'a, C, A> { self._ad_unit_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AdunitCustomchannelListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of custom channels to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AdunitCustomchannelListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdunitCustomchannelListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2853,8 +2851,8 @@ impl<'a, C, A> AdunitCustomchannelListCall<'a, C, A> where C: BorrowMut AdunitGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// Ad client for which to get the ad unit. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to get the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AdunitGetCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Ad unit to retrieve. + /// /// Sets the *ad unit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad unit to retrieve. pub fn ad_unit_id(mut self, new_value: &str) -> AdunitGetCall<'a, C, A> { self._ad_unit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdunitGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3096,8 +3093,8 @@ impl<'a, C, A> AdunitGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3296,47 +3293,43 @@ impl<'a, C, A> AdunitListCall<'a, C, A> where C: BorrowMut, A: oa } + /// Ad client for which to list ad units. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to list ad units. pub fn ad_client_id(mut self, new_value: &str) -> AdunitListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AdunitListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of ad units to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AdunitListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *include inactive* query property to the given value. - /// - /// /// Whether to include inactive ad units. Default: true. + /// + /// Sets the *include inactive* query property to the given value. pub fn include_inactive(mut self, new_value: bool) -> AdunitListCall<'a, C, A> { self._include_inactive = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdunitListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3366,8 +3359,8 @@ impl<'a, C, A> AdunitListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3553,33 +3546,32 @@ impl<'a, C, A> AdunitGetAdCodeCall<'a, C, A> where C: BorrowMut, } + /// Ad client with contains the ad unit. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client with contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AdunitGetAdCodeCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Ad unit to get the code for. + /// /// Sets the *ad unit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad unit to get the code for. pub fn ad_unit_id(mut self, new_value: &str) -> AdunitGetAdCodeCall<'a, C, A> { self._ad_unit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdunitGetAdCodeCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3609,8 +3601,8 @@ impl<'a, C, A> AdunitGetAdCodeCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3778,29 +3770,26 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AdclientListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of ad clients to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AdclientListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdclientListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3830,8 +3819,8 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4004,23 +3993,22 @@ impl<'a, C, A> AlertDeleteCall<'a, C, A> where C: BorrowMut, A: o } + /// Alert to delete. + /// /// Sets the *alert id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Alert to delete. pub fn alert_id(mut self, new_value: &str) -> AlertDeleteCall<'a, C, A> { self._alert_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AlertDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4050,8 +4038,8 @@ impl<'a, C, A> AlertDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4214,21 +4202,19 @@ impl<'a, C, A> AlertListCall<'a, C, A> where C: BorrowMut, A: oau } - /// Sets the *locale* query property to the given value. - /// - /// /// The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> AlertListCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AlertListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4258,8 +4244,8 @@ impl<'a, C, A> AlertListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4427,29 +4413,26 @@ impl<'a, C, A> SavedadstyleListCall<'a, C, A> where C: BorrowMut, } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through saved ad styles. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> SavedadstyleListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of saved ad styles to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> SavedadstyleListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SavedadstyleListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4479,8 +4462,8 @@ impl<'a, C, A> SavedadstyleListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4664,23 +4647,22 @@ impl<'a, C, A> SavedadstyleGetCall<'a, C, A> where C: BorrowMut, } + /// Saved ad style to retrieve. + /// /// Sets the *saved ad style id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Saved ad style to retrieve. pub fn saved_ad_style_id(mut self, new_value: &str) -> SavedadstyleGetCall<'a, C, A> { self._saved_ad_style_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SavedadstyleGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4710,8 +4692,8 @@ impl<'a, C, A> SavedadstyleGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4879,29 +4861,26 @@ impl<'a, C, A> ReportSavedListCall<'a, C, A> where C: BorrowMut, } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ReportSavedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of saved reports to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ReportSavedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportSavedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4931,8 +4910,8 @@ impl<'a, C, A> ReportSavedListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5185,118 +5164,107 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A } + /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// /// Sets the *start date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn start_date(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._start_date = new_value.to_string(); self } + /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// /// Sets the *end date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn end_date(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._end_date = new_value.to_string(); self } - /// Sets the *use timezone reporting* query property to the given value. - /// - /// /// Whether the report should be generated in the AdSense account's local timezone. If false default PST/PDT timezone will be used. + /// + /// Sets the *use timezone reporting* query property to the given value. pub fn use_timezone_reporting(mut self, new_value: bool) -> ReportGenerateCall<'a, C, A> { self._use_timezone_reporting = Some(new_value); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first row of report data to return. + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ReportGenerateCall<'a, C, A> { self._start_index = Some(new_value); self } + /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. + /// /// Append the given value to the *sort* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. pub fn add_sort(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._sort.push(new_value.to_string()); self } + /// Numeric columns to include in the report. + /// /// Append the given value to the *metric* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Numeric columns to include in the report. pub fn add_metric(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._metric.push(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of rows of report data to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ReportGenerateCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } + /// Filters to be run on the report. + /// /// Append the given value to the *filter* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Filters to be run on the report. pub fn add_filter(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._filter.push(new_value.to_string()); self } + /// Dimensions to base the report on. + /// /// Append the given value to the *dimension* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Dimensions to base the report on. pub fn add_dimension(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._dimension.push(new_value.to_string()); self } - /// Sets the *currency* query property to the given value. - /// - /// /// Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set. + /// + /// Sets the *currency* query property to the given value. pub fn currency(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._currency = Some(new_value.to_string()); self } + /// Accounts upon which to report. + /// /// Append the given value to the *account id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Accounts upon which to report. pub fn add_account_id(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._account_id.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportGenerateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5326,8 +5294,8 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5526,47 +5494,43 @@ impl<'a, C, A> ReportSavedGenerateCall<'a, C, A> where C: BorrowMut ReportSavedGenerateCall<'a, C, A> { self._saved_report_id = new_value.to_string(); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first row of report data to return. + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ReportSavedGenerateCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of rows of report data to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ReportSavedGenerateCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> ReportSavedGenerateCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportSavedGenerateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5596,8 +5560,8 @@ impl<'a, C, A> ReportSavedGenerateCall<'a, C, A> where C: BorrowMut AccountAlertDeleteCall<'a, C, A> where C: BorrowMut AccountAlertDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Alert to delete. + /// /// Sets the *alert id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Alert to delete. pub fn alert_id(mut self, new_value: &str) -> AccountAlertDeleteCall<'a, C, A> { self._alert_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAlertDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5828,8 +5791,8 @@ impl<'a, C, A> AccountAlertDeleteCall<'a, C, A> where C: BorrowMut AccountAlertListCall<'a, C, A> where C: BorrowMut, } + /// Account for which to retrieve the alerts. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account for which to retrieve the alerts. pub fn account_id(mut self, new_value: &str) -> AccountAlertListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *locale* query property to the given value. - /// - /// /// The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> AccountAlertListCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAlertListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6072,8 +6033,8 @@ impl<'a, C, A> AccountAlertListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6274,57 +6235,53 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut AccountReportSavedGenerateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// The saved report to retrieve. + /// /// Sets the *saved report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The saved report to retrieve. pub fn saved_report_id(mut self, new_value: &str) -> AccountReportSavedGenerateCall<'a, C, A> { self._saved_report_id = new_value.to_string(); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first row of report data to return. + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> AccountReportSavedGenerateCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of rows of report data to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountReportSavedGenerateCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> AccountReportSavedGenerateCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountReportSavedGenerateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6354,8 +6311,8 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut AccountListCall<'a, C, A> where C: BorrowMut, A: o } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of accounts to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6575,8 +6529,8 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6760,23 +6714,22 @@ impl<'a, C, A> AccountPaymentListCall<'a, C, A> where C: BorrowMut AccountPaymentListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountPaymentListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6806,8 +6759,8 @@ impl<'a, C, A> AccountPaymentListCall<'a, C, A> where C: BorrowMut AccountSavedadstyleGetCall<'a, C, A> where C: BorrowMut AccountSavedadstyleGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Saved ad style to retrieve. + /// /// Sets the *saved ad style id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Saved ad style to retrieve. pub fn saved_ad_style_id(mut self, new_value: &str) -> AccountSavedadstyleGetCall<'a, C, A> { self._saved_ad_style_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountSavedadstyleGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7049,8 +7001,8 @@ impl<'a, C, A> AccountSavedadstyleGetCall<'a, C, A> where C: BorrowMut AccountAdunitGetCall<'a, C, A> where C: BorrowMut, } + /// Account to which the ad client belongs. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client for which to get the ad unit. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to get the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Ad unit to retrieve. + /// /// Sets the *ad unit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad unit to retrieve. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, A> { self._ad_unit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdunitGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7304,8 +7255,8 @@ impl<'a, C, A> AccountAdunitGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7493,43 +7444,42 @@ impl<'a, C, A> AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut AccountCustomchannelGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client which contains the custom channel. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client which contains the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> AccountCustomchannelGetCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Custom channel to retrieve. + /// /// Sets the *custom channel id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom channel to retrieve. pub fn custom_channel_id(mut self, new_value: &str) -> AccountCustomchannelGetCall<'a, C, A> { self._custom_channel_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountCustomchannelGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7559,8 +7509,8 @@ impl<'a, C, A> AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut AccountCustomchannelAdunitListCall<'a, C, A> where C: BorrowMut AccountCustomchannelAdunitListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client which contains the custom channel. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client which contains the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> AccountCustomchannelAdunitListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Custom channel for which to list ad units. + /// /// Sets the *custom channel id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom channel for which to list ad units. pub fn custom_channel_id(mut self, new_value: &str) -> AccountCustomchannelAdunitListCall<'a, C, A> { self._custom_channel_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountCustomchannelAdunitListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of ad units to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountCustomchannelAdunitListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *include inactive* query property to the given value. - /// - /// /// Whether to include inactive ad units. Default: true. + /// + /// Sets the *include inactive* query property to the given value. pub fn include_inactive(mut self, new_value: bool) -> AccountCustomchannelAdunitListCall<'a, C, A> { self._include_inactive = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountCustomchannelAdunitListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7853,8 +7799,8 @@ impl<'a, C, A> AccountCustomchannelAdunitListCall<'a, C, A> where C: BorrowMut AccountReportSavedListCall<'a, C, A> where C: BorrowMut AccountReportSavedListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountReportSavedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of saved reports to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountReportSavedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountReportSavedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8110,8 +8053,8 @@ impl<'a, C, A> AccountReportSavedListCall<'a, C, A> where C: BorrowMut AccountUrlchannelListCall<'a, C, A> where C: BorrowMut AccountUrlchannelListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client for which to list URL channels. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to list URL channels. pub fn ad_client_id(mut self, new_value: &str) -> AccountUrlchannelListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountUrlchannelListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of URL channels to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountUrlchannelListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountUrlchannelListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8379,8 +8319,8 @@ impl<'a, C, A> AccountUrlchannelListCall<'a, C, A> where C: BorrowMut AccountAdunitListCall<'a, C, A> where C: BorrowMut } + /// Account to which the ad client belongs. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client for which to list ad units. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to list ad units. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of ad units to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountAdunitListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *include inactive* query property to the given value. - /// - /// /// Whether to include inactive ad units. Default: true. + /// + /// Sets the *include inactive* query property to the given value. pub fn include_inactive(mut self, new_value: bool) -> AccountAdunitListCall<'a, C, A> { self._include_inactive = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdunitListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8661,8 +8597,8 @@ impl<'a, C, A> AccountAdunitListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8932,119 +8868,109 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountReportGenerateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// /// Sets the *start date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn start_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._start_date = new_value.to_string(); self } + /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// /// Sets the *end date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn end_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._end_date = new_value.to_string(); self } - /// Sets the *use timezone reporting* query property to the given value. - /// - /// /// Whether the report should be generated in the AdSense account's local timezone. If false default PST/PDT timezone will be used. + /// + /// Sets the *use timezone reporting* query property to the given value. pub fn use_timezone_reporting(mut self, new_value: bool) -> AccountReportGenerateCall<'a, C, A> { self._use_timezone_reporting = Some(new_value); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first row of report data to return. + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> AccountReportGenerateCall<'a, C, A> { self._start_index = Some(new_value); self } + /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. + /// /// Append the given value to the *sort* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. pub fn add_sort(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._sort.push(new_value.to_string()); self } + /// Numeric columns to include in the report. + /// /// Append the given value to the *metric* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Numeric columns to include in the report. pub fn add_metric(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._metric.push(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of rows of report data to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountReportGenerateCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } + /// Filters to be run on the report. + /// /// Append the given value to the *filter* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Filters to be run on the report. pub fn add_filter(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._filter.push(new_value.to_string()); self } + /// Dimensions to base the report on. + /// /// Append the given value to the *dimension* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Dimensions to base the report on. pub fn add_dimension(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._dimension.push(new_value.to_string()); self } - /// Sets the *currency* query property to the given value. - /// - /// /// Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set. + /// + /// Sets the *currency* query property to the given value. pub fn currency(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._currency = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountReportGenerateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9074,8 +9000,8 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountAdclientListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of ad clients to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountAdclientListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdclientListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9331,8 +9254,8 @@ impl<'a, C, A> AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountCustomchannelListCall<'a, C, A> where C: BorrowMut AccountCustomchannelListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client for which to list custom channels. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to list custom channels. pub fn ad_client_id(mut self, new_value: &str) -> AccountCustomchannelListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountCustomchannelListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of custom channels to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountCustomchannelListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountCustomchannelListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9600,8 +9520,8 @@ impl<'a, C, A> AccountCustomchannelListCall<'a, C, A> where C: BorrowMut AccountSavedadstyleListCall<'a, C, A> where C: BorrowMut AccountSavedadstyleListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through saved ad styles. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountSavedadstyleListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of saved ad styles to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountSavedadstyleListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountSavedadstyleListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9857,8 +9774,8 @@ impl<'a, C, A> AccountSavedadstyleListCall<'a, C, A> where C: BorrowMut AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut AccountAdunitGetAdCodeCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client with contains the ad unit. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client with contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Ad unit to get the code for. + /// /// Sets the *ad unit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad unit to get the code for. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, A> { self._ad_unit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdunitGetAdCodeCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10112,8 +10028,8 @@ impl<'a, C, A> AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut AccountAdunitCustomchannelListCall<'a, C, A> where C: BorrowMut AccountAdunitCustomchannelListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client which contains the ad unit. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client which contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitCustomchannelListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Ad unit for which to list custom channels. + /// /// Sets the *ad unit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad unit for which to list custom channels. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitCustomchannelListCall<'a, C, A> { self._ad_unit_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountAdunitCustomchannelListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of custom channels to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountAdunitCustomchannelListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdunitCustomchannelListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10393,8 +10306,8 @@ impl<'a, C, A> AccountAdunitCustomchannelListCall<'a, C, A> where C: BorrowMut AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// Account to get information about. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account to get information about. pub fn account_id(mut self, new_value: &str) -> AccountGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *tree* query property to the given value. - /// - /// /// Whether the tree of sub accounts should be returned. + /// + /// Sets the *tree* query property to the given value. pub fn tree(mut self, new_value: bool) -> AccountGetCall<'a, C, A> { self._tree = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10637,8 +10548,8 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10796,13 +10707,12 @@ impl<'a, C, A> PaymentListCall<'a, C, A> where C: BorrowMut, A: o } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PaymentListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10832,8 +10742,8 @@ impl<'a, C, A> PaymentListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10991,13 +10901,12 @@ impl<'a, C, A> MetadataDimensionListCall<'a, C, A> where C: BorrowMut MetadataDimensionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11027,8 +10936,8 @@ impl<'a, C, A> MetadataDimensionListCall<'a, C, A> where C: BorrowMut MetadataMetricListCall<'a, C, A> where C: BorrowMut MetadataMetricListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11222,8 +11130,8 @@ impl<'a, C, A> MetadataMetricListCall<'a, C, A> where C: BorrowMut CustomchannelGetCall<'a, C, A> where C: BorrowMut, } + /// Ad client which contains the custom channel. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client which contains the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelGetCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Custom channel to retrieve. + /// /// Sets the *custom channel id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom channel to retrieve. pub fn custom_channel_id(mut self, new_value: &str) -> CustomchannelGetCall<'a, C, A> { self._custom_channel_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CustomchannelGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11465,8 +11372,8 @@ impl<'a, C, A> CustomchannelGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11660,39 +11567,36 @@ impl<'a, C, A> CustomchannelListCall<'a, C, A> where C: BorrowMut } + /// Ad client for which to list custom channels. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to list custom channels. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CustomchannelListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of custom channels to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> CustomchannelListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CustomchannelListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11722,8 +11626,8 @@ impl<'a, C, A> CustomchannelListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11924,57 +11828,53 @@ impl<'a, C, A> CustomchannelAdunitListCall<'a, C, A> where C: BorrowMut CustomchannelAdunitListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Custom channel for which to list ad units. + /// /// Sets the *custom channel id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom channel for which to list ad units. pub fn custom_channel_id(mut self, new_value: &str) -> CustomchannelAdunitListCall<'a, C, A> { self._custom_channel_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CustomchannelAdunitListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of ad units to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> CustomchannelAdunitListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *include inactive* query property to the given value. - /// - /// /// Whether to include inactive ad units. Default: true. + /// + /// Sets the *include inactive* query property to the given value. pub fn include_inactive(mut self, new_value: bool) -> CustomchannelAdunitListCall<'a, C, A> { self._include_inactive = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CustomchannelAdunitListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12004,8 +11904,8 @@ impl<'a, C, A> CustomchannelAdunitListCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/adsensehost4d1/src/cmn.rs b/gen/adsensehost4d1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/adsensehost4d1/src/cmn.rs +++ b/gen/adsensehost4d1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/adsensehost4d1/src/lib.rs b/gen/adsensehost4d1/src/lib.rs index 5925bf797f..abc0aea66b 100644 --- a/gen/adsensehost4d1/src/lib.rs +++ b/gen/adsensehost4d1/src/lib.rs @@ -126,16 +126,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -300,16 +302,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -375,7 +379,7 @@ impl<'a, C, A> AdSenseHost /// /// * [list urlchannels](struct.UrlchannelListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UrlChannels { /// Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -395,7 +399,7 @@ impl ResponseResult for UrlChannels {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportHeaders { /// The currency of this column. Only present if the header type is METRIC_CURRENCY. pub currency: String, @@ -430,7 +434,7 @@ impl Part for ReportHeaders {} /// * [adclients list accounts](struct.AccountAdclientListCall.html) (none) /// * [adclients get accounts](struct.AccountAdclientGetCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Account { /// Approval status of this account. One of: PENDING, APPROVED, DISABLED. pub status: String, @@ -455,7 +459,7 @@ impl ResponseResult for Account {} /// /// * [adunits list accounts](struct.AccountAdunitListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdUnits { /// Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -481,7 +485,7 @@ impl ResponseResult for AdUnits {} /// * [list adclients](struct.AdclientListCall.html) (response) /// * [adclients list accounts](struct.AccountAdclientListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdClients { /// Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -570,7 +574,7 @@ impl Part for AdUnitMobileContentAdsSettings {} /// /// * [adunits get ad code accounts](struct.AccountAdunitGetAdCodeCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdCode { /// The ad code snippet. #[serde(rename="adCode")] @@ -663,7 +667,7 @@ impl ResponseResult for UrlChannel {} /// * [get adclients](struct.AdclientGetCall.html) (response) /// * [adclients get accounts](struct.AccountAdclientGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdClient { /// This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. #[serde(rename="productCode")] @@ -713,7 +717,7 @@ impl Part for AdUnitContentAdsSettingsBackupOption {} /// * [verify associationsessions](struct.AssociationsessionVerifyCall.html) (response) /// * [start associationsessions](struct.AssociationsessionStartCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AssociationSession { /// Status of the completed association, available once the association callback token has been verified. One of ACCEPTED, REJECTED, or ERROR. pub status: String, @@ -754,7 +758,7 @@ impl ResponseResult for AssociationSession {} /// /// * [list accounts](struct.AccountListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Accounts { /// The accounts returned in this list response. pub items: Vec, @@ -813,7 +817,7 @@ impl Part for AdStyleFont {} /// * [reports generate accounts](struct.AccountReportGenerateCall.html) (response) /// * [generate reports](struct.ReportGenerateCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Report { /// The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for each metric in the request. pub headers: Vec, @@ -875,7 +879,7 @@ impl ResponseResult for CustomChannel {} /// /// * [list customchannels](struct.CustomchannelListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomChannels { /// Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(rename="nextPageToken")] @@ -1850,32 +1854,31 @@ impl<'a, C, A> UrlchannelInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &UrlChannel) -> UrlchannelInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Ad client to which the new URL channel will be added. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client to which the new URL channel will be added. pub fn ad_client_id(mut self, new_value: &str) -> UrlchannelInsertCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UrlchannelInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1905,8 +1908,8 @@ impl<'a, C, A> UrlchannelInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2092,33 +2095,32 @@ impl<'a, C, A> UrlchannelDeleteCall<'a, C, A> where C: BorrowMut, } + /// Ad client from which to delete the URL channel. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client from which to delete the URL channel. pub fn ad_client_id(mut self, new_value: &str) -> UrlchannelDeleteCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// URL channel to delete. + /// /// Sets the *url channel id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// URL channel to delete. pub fn url_channel_id(mut self, new_value: &str) -> UrlchannelDeleteCall<'a, C, A> { self._url_channel_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UrlchannelDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2148,8 +2150,8 @@ impl<'a, C, A> UrlchannelDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2343,39 +2345,36 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A } + /// Ad client for which to list URL channels. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to list URL channels. pub fn ad_client_id(mut self, new_value: &str) -> UrlchannelListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> UrlchannelListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of URL channels to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> UrlchannelListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UrlchannelListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2405,8 +2404,8 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2574,29 +2573,26 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AdclientListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of ad clients to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AdclientListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdclientListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2626,8 +2622,8 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2811,23 +2807,22 @@ impl<'a, C, A> AdclientGetCall<'a, C, A> where C: BorrowMut, A: o } + /// Ad client to get. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client to get. pub fn ad_client_id(mut self, new_value: &str) -> AdclientGetCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdclientGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2857,8 +2852,8 @@ impl<'a, C, A> AdclientGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3036,50 +3031,47 @@ impl<'a, C, A> AssociationsessionStartCall<'a, C, A> where C: BorrowMut AssociationsessionStartCall<'a, C, A> { self._product_code.push(new_value.to_string()); self } + /// The URL of the user's hosted website. + /// /// Sets the *website url* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The URL of the user's hosted website. pub fn website_url(mut self, new_value: &str) -> AssociationsessionStartCall<'a, C, A> { self._website_url = new_value.to_string(); self } - /// Sets the *website locale* query property to the given value. - /// - /// /// The locale of the user's hosted website. + /// + /// Sets the *website locale* query property to the given value. pub fn website_locale(mut self, new_value: &str) -> AssociationsessionStartCall<'a, C, A> { self._website_locale = Some(new_value.to_string()); self } - /// Sets the *user locale* query property to the given value. - /// - /// /// The preferred locale of the user. + /// + /// Sets the *user locale* query property to the given value. pub fn user_locale(mut self, new_value: &str) -> AssociationsessionStartCall<'a, C, A> { self._user_locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AssociationsessionStartCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3109,8 +3101,8 @@ impl<'a, C, A> AssociationsessionStartCall<'a, C, A> where C: BorrowMut AssociationsessionVerifyCall<'a, C, A> where C: BorrowMut AssociationsessionVerifyCall<'a, C, A> { self._token = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AssociationsessionVerifyCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3316,8 +3307,8 @@ impl<'a, C, A> AssociationsessionVerifyCall<'a, C, A> where C: BorrowMut ReportGenerateCall<'a, C, A> where C: BorrowMut, A } + /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// /// Sets the *start date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn start_date(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._start_date = new_value.to_string(); self } + /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// /// Sets the *end date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn end_date(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._end_date = new_value.to_string(); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first row of report data to return. + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: u32) -> ReportGenerateCall<'a, C, A> { self._start_index = Some(new_value); self } + /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. + /// /// Append the given value to the *sort* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. pub fn add_sort(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._sort.push(new_value.to_string()); self } + /// Numeric columns to include in the report. + /// /// Append the given value to the *metric* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Numeric columns to include in the report. pub fn add_metric(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._metric.push(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of rows of report data to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ReportGenerateCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } + /// Filters to be run on the report. + /// /// Append the given value to the *filter* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Filters to be run on the report. pub fn add_filter(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._filter.push(new_value.to_string()); self } + /// Dimensions to base the report on. + /// /// Append the given value to the *dimension* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Dimensions to base the report on. pub fn add_dimension(mut self, new_value: &str) -> ReportGenerateCall<'a, C, A> { self._dimension.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportGenerateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3646,8 +3629,8 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3848,57 +3831,53 @@ impl<'a, C, A> AccountAdunitListCall<'a, C, A> where C: BorrowMut } + /// Account which contains the ad client. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account which contains the ad client. pub fn account_id(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client for which to list ad units. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to list ad units. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of ad units to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AccountAdunitListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *include inactive* query property to the given value. - /// - /// /// Whether to include inactive ad units. Default: true. + /// + /// Sets the *include inactive* query property to the given value. pub fn include_inactive(mut self, new_value: bool) -> AccountAdunitListCall<'a, C, A> { self._include_inactive = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdunitListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3928,8 +3907,8 @@ impl<'a, C, A> AccountAdunitListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4095,24 +4074,23 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } + /// Ad clients to list accounts for. + /// /// Append the given value to the *filter ad client id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad clients to list accounts for. pub fn add_filter_ad_client_id(mut self, new_value: &str) -> AccountListCall<'a, C, A> { self._filter_ad_client_id.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4142,8 +4120,8 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4340,52 +4318,50 @@ impl<'a, C, A> AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut AccountAdunitGetAdCodeCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client with contains the ad unit. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client with contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Ad unit to get the code for. + /// /// Sets the *ad unit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad unit to get the code for. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, A> { self._ad_unit_id = new_value.to_string(); self } + /// Host custom channel to attach to the ad code. + /// /// Append the given value to the *host custom channel id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Host custom channel to attach to the ad code. pub fn add_host_custom_channel_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, A> { self._host_custom_channel_id.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdunitGetAdCodeCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4415,8 +4391,8 @@ impl<'a, C, A> AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountReportGenerateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// /// Sets the *start date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn start_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._start_date = new_value.to_string(); self } + /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// /// Sets the *end date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn end_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._end_date = new_value.to_string(); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first row of report data to return. + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: u32) -> AccountReportGenerateCall<'a, C, A> { self._start_index = Some(new_value); self } + /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. + /// /// Append the given value to the *sort* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. pub fn add_sort(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._sort.push(new_value.to_string()); self } + /// Numeric columns to include in the report. + /// /// Append the given value to the *metric* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Numeric columns to include in the report. pub fn add_metric(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._metric.push(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of rows of report data to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AccountReportGenerateCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } + /// Filters to be run on the report. + /// /// Append the given value to the *filter* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Filters to be run on the report. pub fn add_filter(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._filter.push(new_value.to_string()); self } + /// Dimensions to base the report on. + /// /// Append the given value to the *dimension* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Dimensions to base the report on. pub fn add_dimension(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, A> { self._dimension.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountReportGenerateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4781,8 +4749,8 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountAdunitDeleteCall<'a, C, A> where C: BorrowMut AccountAdunitDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client for which to get ad unit. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to get ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitDeleteCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Ad unit to delete. + /// /// Sets the *ad unit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad unit to delete. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitDeleteCall<'a, C, A> { self._ad_unit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdunitDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5036,8 +5003,8 @@ impl<'a, C, A> AccountAdunitDeleteCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountAdclientListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of ad clients to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AccountAdclientListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdclientListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5293,8 +5257,8 @@ impl<'a, C, A> AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountAdunitPatchCall<'a, C, A> where C: BorrowMut AccountAdunitPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account which contains the ad client. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account which contains the ad client. pub fn account_id(mut self, new_value: &str) -> AccountAdunitPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client which contains the ad unit. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client which contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitPatchCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Ad unit to get. + /// /// Sets the *ad unit id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad unit to get. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitPatchCall<'a, C, A> { self._ad_unit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdunitPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5572,8 +5535,8 @@ impl<'a, C, A> AccountAdunitPatchCall<'a, C, A> where C: BorrowMut AccountAdclientGetCall<'a, C, A> where C: BorrowMut AccountAdclientGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client to get. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client to get. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdclientGetCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdclientGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5815,8 +5777,8 @@ impl<'a, C, A> AccountAdclientGetCall<'a, C, A> where C: BorrowMut AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// Account to get information about. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account to get information about. pub fn account_id(mut self, new_value: &str) -> AccountGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6046,8 +6007,8 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6248,42 +6209,41 @@ impl<'a, C, A> AccountAdunitInsertCall<'a, C, A> where C: BorrowMut AccountAdunitInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account which will contain the ad unit. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account which will contain the ad unit. pub fn account_id(mut self, new_value: &str) -> AccountAdunitInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client into which to insert the ad unit. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client into which to insert the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitInsertCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdunitInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6313,8 +6273,8 @@ impl<'a, C, A> AccountAdunitInsertCall<'a, C, A> where C: BorrowMut AccountAdunitGetCall<'a, C, A> where C: BorrowMut, } + /// Account which contains the ad unit. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account which contains the ad unit. pub fn account_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client for which to get ad unit. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to get ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Ad unit to get. + /// /// Sets the *ad unit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad unit to get. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, A> { self._ad_unit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdunitGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6568,8 +6527,8 @@ impl<'a, C, A> AccountAdunitGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6770,42 +6729,41 @@ impl<'a, C, A> AccountAdunitUpdateCall<'a, C, A> where C: BorrowMut AccountAdunitUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account which contains the ad client. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account which contains the ad client. pub fn account_id(mut self, new_value: &str) -> AccountAdunitUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Ad client which contains the ad unit. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client which contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitUpdateCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAdunitUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6835,8 +6793,8 @@ impl<'a, C, A> AccountAdunitUpdateCall<'a, C, A> where C: BorrowMut CustomchannelGetCall<'a, C, A> where C: BorrowMut, } + /// Ad client from which to get the custom channel. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client from which to get the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelGetCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Custom channel to get. + /// /// Sets the *custom channel id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom channel to get. pub fn custom_channel_id(mut self, new_value: &str) -> CustomchannelGetCall<'a, C, A> { self._custom_channel_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CustomchannelGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7078,8 +7035,8 @@ impl<'a, C, A> CustomchannelGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7265,33 +7222,32 @@ impl<'a, C, A> CustomchannelDeleteCall<'a, C, A> where C: BorrowMut CustomchannelDeleteCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Custom channel to delete. + /// /// Sets the *custom channel id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom channel to delete. pub fn custom_channel_id(mut self, new_value: &str) -> CustomchannelDeleteCall<'a, C, A> { self._custom_channel_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CustomchannelDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7321,8 +7277,8 @@ impl<'a, C, A> CustomchannelDeleteCall<'a, C, A> where C: BorrowMut CustomchannelUpdateCall<'a, C, A> where C: BorrowMut CustomchannelUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Ad client in which the custom channel will be updated. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client in which the custom channel will be updated. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelUpdateCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CustomchannelUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7576,8 +7531,8 @@ impl<'a, C, A> CustomchannelUpdateCall<'a, C, A> where C: BorrowMut CustomchannelListCall<'a, C, A> where C: BorrowMut } + /// Ad client for which to list custom channels. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client for which to list custom channels. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelListCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CustomchannelListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of custom channels to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> CustomchannelListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CustomchannelListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7833,8 +7785,8 @@ impl<'a, C, A> CustomchannelListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8035,42 +7987,41 @@ impl<'a, C, A> CustomchannelPatchCall<'a, C, A> where C: BorrowMut CustomchannelPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Ad client in which the custom channel will be updated. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client in which the custom channel will be updated. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelPatchCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } + /// Custom channel to get. + /// /// Sets the *custom channel id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom channel to get. pub fn custom_channel_id(mut self, new_value: &str) -> CustomchannelPatchCall<'a, C, A> { self._custom_channel_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CustomchannelPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8100,8 +8051,8 @@ impl<'a, C, A> CustomchannelPatchCall<'a, C, A> where C: BorrowMut CustomchannelInsertCall<'a, C, A> where C: BorrowMut CustomchannelInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Ad client to which the new custom channel will be added. + /// /// Sets the *ad client id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad client to which the new custom channel will be added. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelInsertCall<'a, C, A> { self._ad_client_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CustomchannelInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8355,8 +8305,8 @@ impl<'a, C, A> CustomchannelInsertCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/analytics3/src/cmn.rs b/gen/analytics3/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/analytics3/src/cmn.rs +++ b/gen/analytics3/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/analytics3/src/lib.rs b/gen/analytics3/src/lib.rs index 53d80af516..cf33bed54d 100644 --- a/gen/analytics3/src/lib.rs +++ b/gen/analytics3/src/lib.rs @@ -119,16 +119,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -312,16 +314,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -571,7 +575,7 @@ impl RequestValue for AnalyticsDataimportDeleteUploadDataRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RealtimeDataProfileInfo { /// Internal ID for the web property to which this view (profile) belongs. #[serde(rename="internalWebPropertyId")] @@ -601,7 +605,7 @@ impl Part for RealtimeDataProfileInfo {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RealtimeDataQuery { /// Maximum results per page. #[serde(rename="max-results")] @@ -659,7 +663,7 @@ impl Part for ProfileRef {} /// /// * [mcf get data](struct.DataMcfGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct McfData { /// Resource type. pub kind: String, @@ -716,7 +720,7 @@ impl ResponseResult for McfData {} /// /// * [custom data sources list management](struct.ManagementCustomDataSourceListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomDataSources { /// Email ID of the authenticated user pub username: String, @@ -753,7 +757,7 @@ impl ResponseResult for CustomDataSources {} /// /// * [goals list management](struct.ManagementGoalListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Goals { /// Email ID of the authenticated user pub username: String, @@ -819,7 +823,7 @@ impl Part for Account {} /// /// * [ga get data](struct.DataGaGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GaData { /// Determines if Analytics data contains samples. #[serde(rename="containsSampledData")] @@ -1012,7 +1016,7 @@ impl Part for UserRef {} /// /// * [accounts list management](struct.ManagementAccountListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Accounts { /// Email ID of the authenticated user pub username: String, @@ -1086,7 +1090,7 @@ impl Part for FilterAdvancedDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct WebPropertySummary { /// Website url for this web property. #[serde(rename="websiteUrl")] @@ -1143,7 +1147,7 @@ impl ResponseResult for AccountTicket {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct McfDataProfileInfo { /// Internal ID for the web property to which this view (profile) belongs. #[serde(rename="internalWebPropertyId")] @@ -1209,7 +1213,7 @@ impl Part for GoalVisitTimeOnSiteDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GaDataDataTable { /// no description provided pub rows: Vec, @@ -1266,7 +1270,7 @@ impl ResponseResult for EntityUserLink {} /// /// * [account summaries list management](struct.ManagementAccountSummaryListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountSummaries { /// Email ID of the authenticated user pub username: String, @@ -1303,7 +1307,7 @@ impl ResponseResult for AccountSummaries {} /// /// * [custom dimensions list management](struct.ManagementCustomDimensionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomDimensions { /// Email ID of the authenticated user pub username: String, @@ -1381,7 +1385,7 @@ impl Part for GoalUrlDestinationDetails {} /// * [uploads get management](struct.ManagementUploadGetCall.html) (response) /// * [uploads upload data management](struct.ManagementUploadUploadDataCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Upload { /// Upload status. Possible values: PENDING, COMPLETED, FAILED, DELETING, DELETED. pub status: String, @@ -1411,7 +1415,7 @@ impl ResponseResult for Upload {} /// /// * [profiles list management](struct.ManagementProfileListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Profiles { /// Email ID of the authenticated user pub username: String, @@ -1457,7 +1461,7 @@ impl Part for AccountPermissions {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GaDataProfileInfo { /// Internal ID for the web property to which this view (profile) belongs. #[serde(rename="internalWebPropertyId")] @@ -1509,7 +1513,7 @@ impl Part for FilterParentLink {} /// /// * [webproperties list management](struct.ManagementWebpropertyListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Webproperties { /// Email ID of the authenticated user pub username: String, @@ -1594,7 +1598,7 @@ impl ResponseResult for ProfileFilterLink {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountSummary { /// Resource type for Analytics AccountSummary. pub kind: String, @@ -1680,7 +1684,7 @@ impl ResponseResult for Webproperty {} /// /// * [realtime get data](struct.DataRealtimeGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RealtimeData { /// Resource type. pub kind: String, @@ -1840,7 +1844,7 @@ impl ResponseResult for Experiment {} /// /// * [custom metrics list management](struct.ManagementCustomMetricListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomMetrics { /// Email ID of the authenticated user pub username: String, @@ -1872,7 +1876,7 @@ impl ResponseResult for CustomMetrics {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GaDataQuery { /// Maximum results per page. #[serde(rename="max-results")] @@ -1916,7 +1920,7 @@ impl Part for GaDataQuery {} /// /// * [columns list metadata](struct.MetadataColumnListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Columns { /// List of columns for a report type. pub items: Vec, @@ -2047,7 +2051,7 @@ impl Part for FilterExpression {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct McfDataRowsConversionPathValue { /// Node value of an interaction on conversion path. Such as source, medium etc. #[serde(rename="nodeValue")] @@ -2065,7 +2069,7 @@ impl Part for McfDataRowsConversionPathValue {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GaDataDataTableRows { /// no description provided pub c: Vec, @@ -2140,7 +2144,7 @@ impl Part for WebpropertyChildLink {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GaDataDataTableRowsC { /// no description provided pub v: String, @@ -2154,7 +2158,7 @@ impl Part for GaDataDataTableRowsC {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Column { /// Map of attribute name and value for this column. pub attributes: HashMap, @@ -2176,7 +2180,7 @@ impl Part for Column {} /// /// * [profile filter links list management](struct.ManagementProfileFilterLinkListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProfileFilterLinks { /// Email ID of the authenticated user pub username: String, @@ -2311,7 +2315,7 @@ impl ResponseResult for EntityAdWordsLink {} /// /// * [uploads list management](struct.ManagementUploadListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Uploads { /// Collection type. pub kind: String, @@ -2416,7 +2420,7 @@ impl Part for CustomMetricParentLink {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct McfDataColumnHeaders { /// Data type. Dimension and metric values data types such as INTEGER, DOUBLE, CURRENCY, MCF_SEQUENCE etc. #[serde(rename="dataType")] @@ -2458,7 +2462,7 @@ impl Part for GoalParentLink {} /// /// * [web property ad words links list management](struct.ManagementWebPropertyAdWordsLinkListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EntityAdWordsLinks { /// Collection type. pub kind: String, @@ -2535,7 +2539,7 @@ impl Part for AccountRef {} /// * [webproperty user links list management](struct.ManagementWebpropertyUserLinkListCall.html) (response) /// * [profile user links list management](struct.ManagementProfileUserLinkListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EntityUserLinks { /// Collection type. pub kind: String, @@ -2570,7 +2574,7 @@ impl ResponseResult for EntityUserLinks {} /// /// * [segments list management](struct.ManagementSegmentListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Segments { /// Email ID of the authenticated user pub username: String, @@ -2633,7 +2637,7 @@ impl Part for FilterUppercaseDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct McfDataRows { /// A primitive dimension value. A primitive metric value. #[serde(rename="primitiveValue")] @@ -2651,7 +2655,7 @@ impl Part for McfDataRows {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProfileSummary { /// Resource type for Analytics ProfileSummary. pub kind: String, @@ -2755,7 +2759,7 @@ impl Part for ExperimentVariations {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Segment { /// Segment definition. pub definition: String, @@ -2787,7 +2791,7 @@ impl Part for Segment {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct McfDataQuery { /// Maximum results per page. #[serde(rename="max-results")] @@ -2911,7 +2915,7 @@ impl ResponseResult for Profile {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GaDataColumnHeaders { /// Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, CURRENCY etc. #[serde(rename="dataType")] @@ -2931,7 +2935,7 @@ impl Part for GaDataColumnHeaders {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GaDataDataTableCols { /// no description provided #[serde(rename="type")] @@ -2968,7 +2972,7 @@ impl Part for GoalVisitNumPagesDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomDataSourceChildLink { /// Link to the list of daily uploads for this custom data source. Link to the list of uploads for this custom data source. pub href: String, @@ -2990,7 +2994,7 @@ impl Part for CustomDataSourceChildLink {} /// /// * [unsampled reports list management](struct.ManagementUnsampledReportListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UnsampledReports { /// Email ID of the authenticated user pub username: String, @@ -3022,7 +3026,7 @@ impl ResponseResult for UnsampledReports {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RealtimeDataColumnHeaders { /// Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, CURRENCY etc. #[serde(rename="dataType")] @@ -3057,7 +3061,7 @@ impl Part for EntityAdWordsLinkEntity {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomDataSourceParentLink { /// Link to the web property to which this custom data source belongs. pub href: String, @@ -3074,7 +3078,7 @@ impl Part for CustomDataSourceParentLink {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomDataSource { /// Resource type for Analytics custom data source. pub kind: String, @@ -3146,7 +3150,7 @@ impl Part for CustomDimensionParentLink {} /// /// * [experiments list management](struct.ManagementExperimentListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Experiments { /// Email ID of the authenticated user pub username: String, @@ -3183,7 +3187,7 @@ impl ResponseResult for Experiments {} /// /// * [filters list management](struct.ManagementFilterListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Filters { /// Email ID of the authenticated user pub username: String, @@ -5181,7 +5185,7 @@ impl<'a, C, A> ManagementWebpropertyInsertCall<'a, C, A> where C: BorrowMut ManagementWebpropertyInsertCall<'a, C, A> where C: BorrowMut ManagementWebpropertyInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to create the web property for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to create the web property for. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebpropertyInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5340,8 +5343,8 @@ impl<'a, C, A> ManagementWebpropertyInsertCall<'a, C, A> where C: BorrowMut ManagementProfileGetCall<'a, C, A> where C: BorrowMut ManagementProfileGetCall<'a, C, A> where C: BorrowMut ManagementProfileGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to retrieve the goal for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to retrieve the goal for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileGetCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to retrieve the goal for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to retrieve the goal for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5595,8 +5597,8 @@ impl<'a, C, A> ManagementProfileGetCall<'a, C, A> where C: BorrowMut ManagementAccountListCall<'a, C, A> where C: BorrowMut ManagementAccountListCall<'a, C, A> where C: BorrowMut ManagementAccountListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of accounts to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementAccountListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementAccountListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5816,8 +5815,8 @@ impl<'a, C, A> ManagementAccountListCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkPatchCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{profileId}", "profileId"), ("{linkId}", "linkId")].iter() { @@ -6022,62 +6021,61 @@ impl<'a, C, A> ManagementProfileFilterLinkPatchCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &ProfileFilterLink) -> ManagementProfileFilterLinkPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to which profile filter link belongs. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to which profile filter link belongs. pub fn account_id(mut self, new_value: &str) -> ManagementProfileFilterLinkPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property Id to which profile filter link belongs + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property Id to which profile filter link belongs pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkPatchCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Profile ID to which filter link belongs + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Profile ID to which filter link belongs pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// ID of the profile filter link to be updated. + /// /// Sets the *link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the profile filter link to be updated. pub fn link_id(mut self, new_value: &str) -> ManagementProfileFilterLinkPatchCall<'a, C, A> { self._link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileFilterLinkPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6107,8 +6105,8 @@ impl<'a, C, A> ManagementProfileFilterLinkPatchCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Edit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6199,7 +6197,7 @@ impl<'a, C, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> where C: Borrow let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{linkId}", "linkId")].iter() { @@ -6285,43 +6283,42 @@ impl<'a, C, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> where C: Borrow } + /// Account ID to delete the user link for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to delete the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web Property ID to delete the user link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web Property ID to delete the user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Link ID to delete the user link for. + /// /// Sets the *link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Link ID to delete the user link for. pub fn link_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> { self._link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6351,8 +6348,8 @@ impl<'a, C, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> where C: Borrow /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ManageUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6445,7 +6442,7 @@ impl<'a, C, A> ManagementProfileUserLinkDeleteCall<'a, C, A> where C: BorrowMut< let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{profileId}", "profileId"), ("{linkId}", "linkId")].iter() { @@ -6531,53 +6528,52 @@ impl<'a, C, A> ManagementProfileUserLinkDeleteCall<'a, C, A> where C: BorrowMut< } + /// Account ID to delete the user link for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to delete the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileUserLinkDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web Property ID to delete the user link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web Property ID to delete the user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileUserLinkDeleteCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to delete the user link for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to delete the user link for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileUserLinkDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Link ID to delete the user link for. + /// /// Sets the *link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Link ID to delete the user link for. pub fn link_id(mut self, new_value: &str) -> ManagementProfileUserLinkDeleteCall<'a, C, A> { self._link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileUserLinkDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6607,8 +6603,8 @@ impl<'a, C, A> ManagementProfileUserLinkDeleteCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ManageUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6709,7 +6705,7 @@ impl<'a, C, A> ManagementProfileUserLinkUpdateCall<'a, C, A> where C: BorrowMut< let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{profileId}", "profileId"), ("{linkId}", "linkId")].iter() { @@ -6813,62 +6809,61 @@ impl<'a, C, A> ManagementProfileUserLinkUpdateCall<'a, C, A> where C: BorrowMut< } + /// /// Sets the *request* property to the given value. /// /// 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: &EntityUserLink) -> ManagementProfileUserLinkUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to update the user link for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to update the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileUserLinkUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web Property ID to update the user link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web Property ID to update the user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileUserLinkUpdateCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile ID) to update the user link for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile ID) to update the user link for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileUserLinkUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Link ID to update the user link for. + /// /// Sets the *link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Link ID to update the user link for. pub fn link_id(mut self, new_value: &str) -> ManagementProfileUserLinkUpdateCall<'a, C, A> { self._link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileUserLinkUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6898,8 +6893,8 @@ impl<'a, C, A> ManagementProfileUserLinkUpdateCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ManageUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6994,7 +6989,7 @@ impl<'a, C, A> ManagementFilterInsertCall<'a, C, A> where C: BorrowMut ManagementFilterInsertCall<'a, C, A> where C: BorrowMut ManagementFilterInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to create filter for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to create filter for. pub fn account_id(mut self, new_value: &str) -> ManagementFilterInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementFilterInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7153,8 +7147,8 @@ impl<'a, C, A> ManagementFilterInsertCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkUpdateCall<'a, C, A> where C: BorrowMut< let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/entityUserLinks/{linkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{linkId}", "linkId")].iter() { @@ -7355,42 +7349,41 @@ impl<'a, C, A> ManagementAccountUserLinkUpdateCall<'a, C, A> where C: BorrowMut< } + /// /// Sets the *request* property to the given value. /// /// 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: &EntityUserLink) -> ManagementAccountUserLinkUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to update the account-user link for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to update the account-user link for. pub fn account_id(mut self, new_value: &str) -> ManagementAccountUserLinkUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Link ID to update the account-user link for. + /// /// Sets the *link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Link ID to update the account-user link for. pub fn link_id(mut self, new_value: &str) -> ManagementAccountUserLinkUpdateCall<'a, C, A> { self._link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementAccountUserLinkUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7420,8 +7413,8 @@ impl<'a, C, A> ManagementAccountUserLinkUpdateCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ManageUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7518,7 +7511,7 @@ impl<'a, C, A> ManagementWebpropertyUpdateCall<'a, C, A> where C: BorrowMut ManagementWebpropertyUpdateCall<'a, C, A> where C: BorrowMut ManagementWebpropertyUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to which the web property belongs + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to which the web property belongs pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyUpdateCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebpropertyUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7687,8 +7679,8 @@ impl<'a, C, A> ManagementWebpropertyUpdateCall<'a, C, A> where C: BorrowMut ManagementWebpropertyUserLinkUpdateCall<'a, C, A> where C: Borrow let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{linkId}", "linkId")].iter() { @@ -7891,52 +7883,51 @@ impl<'a, C, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, A> where C: Borrow } + /// /// Sets the *request* property to the given value. /// /// 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: &EntityUserLink) -> ManagementWebpropertyUserLinkUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to update the account-user link for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to update the account-user link for. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to update the account-user link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to update the account-user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkUpdateCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Link ID to update the account-user link for. + /// /// Sets the *link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Link ID to update the account-user link for. pub fn link_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkUpdateCall<'a, C, A> { self._link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebpropertyUserLinkUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7966,8 +7957,8 @@ impl<'a, C, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, A> where C: Borrow /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ManageUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8170,52 +8161,51 @@ impl<'a, C, A> ManagementUnsampledReportInsertCall<'a, C, A> where C: BorrowMut< } + /// /// Sets the *request* property to the given value. /// /// 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: &UnsampledReport) -> ManagementUnsampledReportInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to create the unsampled report for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to create the unsampled report for. pub fn account_id(mut self, new_value: &str) -> ManagementUnsampledReportInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to create the unsampled report for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to create the unsampled report for. pub fn web_property_id(mut self, new_value: &str) -> ManagementUnsampledReportInsertCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to create the unsampled report for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to create the unsampled report for. pub fn profile_id(mut self, new_value: &str) -> ManagementUnsampledReportInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementUnsampledReportInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8245,8 +8235,8 @@ impl<'a, C, A> ManagementUnsampledReportInsertCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8338,7 +8328,7 @@ impl<'a, C, A> ManagementCustomMetricGetCall<'a, C, A> where C: BorrowMut ManagementCustomMetricGetCall<'a, C, A> where C: BorrowMut ManagementCustomMetricGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID for the custom metric to retrieve. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID for the custom metric to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomMetricGetCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// The ID of the custom metric to retrieve. + /// /// Sets the *custom metric id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the custom metric to retrieve. pub fn custom_metric_id(mut self, new_value: &str) -> ManagementCustomMetricGetCall<'a, C, A> { self._custom_metric_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementCustomMetricGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8500,8 +8489,8 @@ impl<'a, C, A> ManagementCustomMetricGetCall<'a, C, A> where C: BorrowMut ManagementUploadGetCall<'a, C, A> where C: BorrowMut ManagementUploadGetCall<'a, C, A> where C: BorrowMut ManagementUploadGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property Id for the upload to retrieve. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property Id for the upload to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementUploadGetCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Custom data source Id for upload to retrieve. + /// /// Sets the *custom data source id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom data source Id for upload to retrieve. pub fn custom_data_source_id(mut self, new_value: &str) -> ManagementUploadGetCall<'a, C, A> { self._custom_data_source_id = new_value.to_string(); self } + /// Upload Id to retrieve. + /// /// Sets the *upload id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Upload Id to retrieve. pub fn upload_id(mut self, new_value: &str) -> ManagementUploadGetCall<'a, C, A> { self._upload_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementUploadGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8767,8 +8755,8 @@ impl<'a, C, A> ManagementUploadGetCall<'a, C, A> where C: BorrowMut ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> where C: Borrow let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::ManageUserReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{webPropertyAdWordsLinkId}", "webPropertyAdWordsLinkId")].iter() { @@ -8956,43 +8944,42 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> where C: Borrow } + /// ID of the account which the given web property belongs to. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the account which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to retrieve the AdWords link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to retrieve the AdWords link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Web property-AdWords link ID. + /// /// Sets the *web property ad words link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property-AdWords link ID. pub fn web_property_ad_words_link_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> { self._web_property_ad_words_link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9022,8 +9009,8 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> where C: Borrow /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9219,49 +9206,46 @@ impl<'a, C, A> ManagementWebpropertyUserLinkListCall<'a, C, A> where C: BorrowMu } + /// Account ID which the given web property belongs to. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web Property ID for the webProperty-user links to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web Property ID for the webProperty-user links to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first webProperty-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementWebpropertyUserLinkListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of webProperty-user Links to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementWebpropertyUserLinkListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebpropertyUserLinkListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9291,8 +9275,8 @@ impl<'a, C, A> ManagementWebpropertyUserLinkListCall<'a, C, A> where C: BorrowMu /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ManageUserReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9393,7 +9377,7 @@ impl<'a, C, A> ManagementProfileFilterLinkUpdateCall<'a, C, A> where C: BorrowMu let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{profileId}", "profileId"), ("{linkId}", "linkId")].iter() { @@ -9497,62 +9481,61 @@ impl<'a, C, A> ManagementProfileFilterLinkUpdateCall<'a, C, A> where C: BorrowMu } + /// /// Sets the *request* property to the given value. /// /// 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: &ProfileFilterLink) -> ManagementProfileFilterLinkUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to which profile filter link belongs. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to which profile filter link belongs. pub fn account_id(mut self, new_value: &str) -> ManagementProfileFilterLinkUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property Id to which profile filter link belongs + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property Id to which profile filter link belongs pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkUpdateCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Profile ID to which filter link belongs + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Profile ID to which filter link belongs pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// ID of the profile filter link to be updated. + /// /// Sets the *link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the profile filter link to be updated. pub fn link_id(mut self, new_value: &str) -> ManagementProfileFilterLinkUpdateCall<'a, C, A> { self._link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileFilterLinkUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9582,8 +9565,8 @@ impl<'a, C, A> ManagementProfileFilterLinkUpdateCall<'a, C, A> where C: BorrowMu /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Edit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9677,7 +9660,7 @@ impl<'a, C, A> ManagementExperimentGetCall<'a, C, A> where C: BorrowMut ManagementExperimentGetCall<'a, C, A> where C: BorrowMut ManagementExperimentGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to retrieve the experiment for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to retrieve the experiment for. pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentGetCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to retrieve the experiment for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to retrieve the experiment for. pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Experiment ID to retrieve the experiment for. + /// /// Sets the *experiment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Experiment ID to retrieve the experiment for. pub fn experiment_id(mut self, new_value: &str) -> ManagementExperimentGetCall<'a, C, A> { self._experiment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementExperimentGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9849,8 +9831,8 @@ impl<'a, C, A> ManagementExperimentGetCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionUpdateCall<'a, C, A> where C: BorrowMut< let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{customDimensionId}", "customDimensionId")].iter() { @@ -10058,60 +10040,58 @@ impl<'a, C, A> ManagementCustomDimensionUpdateCall<'a, C, A> where C: BorrowMut< } + /// /// Sets the *request* property to the given value. /// /// 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: &CustomDimension) -> ManagementCustomDimensionUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID for the custom dimension to update. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID for the custom dimension to update. pub fn account_id(mut self, new_value: &str) -> ManagementCustomDimensionUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID for the custom dimension to update. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID for the custom dimension to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDimensionUpdateCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Custom dimension ID for the custom dimension to update. + /// /// Sets the *custom dimension id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom dimension ID for the custom dimension to update. pub fn custom_dimension_id(mut self, new_value: &str) -> ManagementCustomDimensionUpdateCall<'a, C, A> { self._custom_dimension_id = new_value.to_string(); self } - /// Sets the *ignore custom data source links* query property to the given value. - /// - /// /// Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set. + /// + /// Sets the *ignore custom data source links* query property to the given value. pub fn ignore_custom_data_source_links(mut self, new_value: bool) -> ManagementCustomDimensionUpdateCall<'a, C, A> { self._ignore_custom_data_source_links = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementCustomDimensionUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10141,8 +10121,8 @@ impl<'a, C, A> ManagementCustomDimensionUpdateCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Edit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10236,7 +10216,7 @@ impl<'a, C, A> ManagementUnsampledReportGetCall<'a, C, A> where C: BorrowMut ManagementUnsampledReportGetCall<'a, C, A> where C: BorrowMut ManagementUnsampledReportGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to retrieve unsampled reports for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to retrieve unsampled reports for. pub fn web_property_id(mut self, new_value: &str) -> ManagementUnsampledReportGetCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to retrieve unsampled report for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to retrieve unsampled report for. pub fn profile_id(mut self, new_value: &str) -> ManagementUnsampledReportGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// ID of the unsampled report to retrieve. + /// /// Sets the *unsampled report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the unsampled report to retrieve. pub fn unsampled_report_id(mut self, new_value: &str) -> ManagementUnsampledReportGetCall<'a, C, A> { self._unsampled_report_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementUnsampledReportGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10408,8 +10387,8 @@ impl<'a, C, A> ManagementUnsampledReportGetCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkInsertCall<'a, C, A> where C: BorrowMu let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{profileId}", "profileId")].iter() { @@ -10612,52 +10591,51 @@ impl<'a, C, A> ManagementProfileFilterLinkInsertCall<'a, C, A> where C: BorrowMu } + /// /// Sets the *request* property to the given value. /// /// 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: &ProfileFilterLink) -> ManagementProfileFilterLinkInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to create profile filter link for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to create profile filter link for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileFilterLinkInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property Id to create profile filter link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property Id to create profile filter link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkInsertCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Profile ID to create filter link for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Profile ID to create filter link for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileFilterLinkInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10687,8 +10665,8 @@ impl<'a, C, A> ManagementProfileFilterLinkInsertCall<'a, C, A> where C: BorrowMu /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Edit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10785,7 +10763,7 @@ impl<'a, C, A> ManagementFilterUpdateCall<'a, C, A> where C: BorrowMut ManagementFilterUpdateCall<'a, C, A> where C: BorrowMut ManagementFilterUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to which the filter belongs. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to which the filter belongs. pub fn account_id(mut self, new_value: &str) -> ManagementFilterUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// ID of the filter to be updated. + /// /// Sets the *filter id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the filter to be updated. pub fn filter_id(mut self, new_value: &str) -> ManagementFilterUpdateCall<'a, C, A> { self._filter_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementFilterUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10954,8 +10931,8 @@ impl<'a, C, A> ManagementFilterUpdateCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkDeleteCall<'a, C, A> where C: BorrowMu let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{profileId}", "profileId"), ("{linkId}", "linkId")].iter() { @@ -11134,53 +11111,52 @@ impl<'a, C, A> ManagementProfileFilterLinkDeleteCall<'a, C, A> where C: BorrowMu } + /// Account ID to which the profile filter link belongs. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to which the profile filter link belongs. pub fn account_id(mut self, new_value: &str) -> ManagementProfileFilterLinkDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property Id to which the profile filter link belongs. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property Id to which the profile filter link belongs. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkDeleteCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Profile ID to which the filter link belongs. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Profile ID to which the filter link belongs. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// ID of the profile filter link to delete. + /// /// Sets the *link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the profile filter link to delete. pub fn link_id(mut self, new_value: &str) -> ManagementProfileFilterLinkDeleteCall<'a, C, A> { self._link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileFilterLinkDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11210,8 +11186,8 @@ impl<'a, C, A> ManagementProfileFilterLinkDeleteCall<'a, C, A> where C: BorrowMu /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Edit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11307,7 +11283,7 @@ impl<'a, C, A> ManagementSegmentListCall<'a, C, A> where C: BorrowMut ManagementSegmentListCall<'a, C, A> where C: BorrowMut ManagementSegmentListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of segments to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementSegmentListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementSegmentListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11431,8 +11404,8 @@ impl<'a, C, A> ManagementSegmentListCall<'a, C, A> where C: BorrowMut ManagementProfileDeleteCall<'a, C, A> where C: BorrowMut ManagementProfileDeleteCall<'a, C, A> where C: BorrowMut ManagementProfileDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to delete the view (profile) for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to delete the view (profile) for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileDeleteCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// ID of the view (profile) to be deleted. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the view (profile) to be deleted. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11675,8 +11647,8 @@ impl<'a, C, A> ManagementProfileDeleteCall<'a, C, A> where C: BorrowMut ManagementGoalPatchCall<'a, C, A> where C: BorrowMut ManagementGoalPatchCall<'a, C, A> where C: BorrowMut ManagementGoalPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to update the goal. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to update the goal. pub fn account_id(mut self, new_value: &str) -> ManagementGoalPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to update the goal. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to update the goal. pub fn web_property_id(mut self, new_value: &str) -> ManagementGoalPatchCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to update the goal. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to update the goal. pub fn profile_id(mut self, new_value: &str) -> ManagementGoalPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Index of the goal to be updated. + /// /// Sets the *goal id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Index of the goal to be updated. pub fn goal_id(mut self, new_value: &str) -> ManagementGoalPatchCall<'a, C, A> { self._goal_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementGoalPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11966,8 +11937,8 @@ impl<'a, C, A> ManagementGoalPatchCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionPatchCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionPatchCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID for the custom dimension to update. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID for the custom dimension to update. pub fn account_id(mut self, new_value: &str) -> ManagementCustomDimensionPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID for the custom dimension to update. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID for the custom dimension to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDimensionPatchCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Custom dimension ID for the custom dimension to update. + /// /// Sets the *custom dimension id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom dimension ID for the custom dimension to update. pub fn custom_dimension_id(mut self, new_value: &str) -> ManagementCustomDimensionPatchCall<'a, C, A> { self._custom_dimension_id = new_value.to_string(); self } - /// Sets the *ignore custom data source links* query property to the given value. - /// - /// /// Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set. + /// + /// Sets the *ignore custom data source links* query property to the given value. pub fn ignore_custom_data_source_links(mut self, new_value: bool) -> ManagementCustomDimensionPatchCall<'a, C, A> { self._ignore_custom_data_source_links = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementCustomDimensionPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12258,8 +12227,8 @@ impl<'a, C, A> ManagementCustomDimensionPatchCall<'a, C, A> where C: BorrowMut ManagementExperimentPatchCall<'a, C, A> where C: BorrowMut ManagementExperimentPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID of the experiment to update. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID of the experiment to update. pub fn account_id(mut self, new_value: &str) -> ManagementExperimentPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID of the experiment to update. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID of the experiment to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentPatchCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID of the experiment to update. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID of the experiment to update. pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Experiment ID of the experiment to update. + /// /// Sets the *experiment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Experiment ID of the experiment to update. pub fn experiment_id(mut self, new_value: &str) -> ManagementExperimentPatchCall<'a, C, A> { self._experiment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementExperimentPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12549,8 +12517,8 @@ impl<'a, C, A> ManagementExperimentPatchCall<'a, C, A> where C: BorrowMut ManagementExperimentListCall<'a, C, A> where C: BorrowMut ManagementExperimentListCall<'a, C, A> where C: BorrowMut ManagementExperimentListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to retrieve experiments for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to retrieve experiments for. pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to retrieve experiments for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to retrieve experiments for. pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first experiment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementExperimentListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of experiments to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementExperimentListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementExperimentListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12830,8 +12795,8 @@ impl<'a, C, A> ManagementExperimentListCall<'a, C, A> where C: BorrowMut ManagementProfileListCall<'a, C, A> where C: BorrowMut ManagementProfileListCall<'a, C, A> where C: BorrowMut ManagementProfileListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to which the user has access. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to which the user has access. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementProfileListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of views (profiles) to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementProfileListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13099,8 +13061,8 @@ impl<'a, C, A> ManagementProfileListCall<'a, C, A> where C: BorrowMut ManagementGoalListCall<'a, C, A> where C: BorrowMut ManagementGoalListCall<'a, C, A> where C: BorrowMut ManagementGoalListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. pub fn web_property_id(mut self, new_value: &str) -> ManagementGoalListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to. pub fn profile_id(mut self, new_value: &str) -> ManagementGoalListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementGoalListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of goals to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementGoalListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementGoalListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13380,8 +13339,8 @@ impl<'a, C, A> ManagementGoalListCall<'a, C, A> where C: BorrowMut ManagementGoalInsertCall<'a, C, A> where C: BorrowMut ManagementGoalInsertCall<'a, C, A> where C: BorrowMut ManagementGoalInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to create the goal for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to create the goal for. pub fn account_id(mut self, new_value: &str) -> ManagementGoalInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to create the goal for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to create the goal for. pub fn web_property_id(mut self, new_value: &str) -> ManagementGoalInsertCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to create the goal for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to create the goal for. pub fn profile_id(mut self, new_value: &str) -> ManagementGoalInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementGoalInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13659,8 +13617,8 @@ impl<'a, C, A> ManagementGoalInsertCall<'a, C, A> where C: BorrowMut ManagementCustomMetricPatchCall<'a, C, A> where C: BorrowMut ManagementCustomMetricPatchCall<'a, C, A> where C: BorrowMut ManagementCustomMetricPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID for the custom metric to update. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID for the custom metric to update. pub fn account_id(mut self, new_value: &str) -> ManagementCustomMetricPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID for the custom metric to update. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID for the custom metric to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomMetricPatchCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Custom metric ID for the custom metric to update. + /// /// Sets the *custom metric id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom metric ID for the custom metric to update. pub fn custom_metric_id(mut self, new_value: &str) -> ManagementCustomMetricPatchCall<'a, C, A> { self._custom_metric_id = new_value.to_string(); self } - /// Sets the *ignore custom data source links* query property to the given value. - /// - /// /// Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set. + /// + /// Sets the *ignore custom data source links* query property to the given value. pub fn ignore_custom_data_source_links(mut self, new_value: bool) -> ManagementCustomMetricPatchCall<'a, C, A> { self._ignore_custom_data_source_links = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementCustomMetricPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13951,8 +13907,8 @@ impl<'a, C, A> ManagementCustomMetricPatchCall<'a, C, A> where C: BorrowMut ManagementUploadUploadDataCall<'a, C, A> where C: BorrowMut ManagementUploadUploadDataCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property UA-string associated with the upload. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property UA-string associated with the upload. pub fn web_property_id(mut self, new_value: &str) -> ManagementUploadUploadDataCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Custom data source Id to which the data being uploaded belongs. + /// /// Sets the *custom data source id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom data source Id to which the data being uploaded belongs. pub fn custom_data_source_id(mut self, new_value: &str) -> ManagementUploadUploadDataCall<'a, C, A> { self._custom_data_source_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementUploadUploadDataCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14316,8 +14271,8 @@ impl<'a, C, A> ManagementUploadUploadDataCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkInsertCall<'a, C, A> where C: BorrowMut< let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/entityUserLinks".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId")].iter() { @@ -14516,32 +14471,31 @@ impl<'a, C, A> ManagementAccountUserLinkInsertCall<'a, C, A> where C: BorrowMut< } + /// /// Sets the *request* property to the given value. /// /// 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: &EntityUserLink) -> ManagementAccountUserLinkInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to create the user link for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to create the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementAccountUserLinkInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementAccountUserLinkInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14571,8 +14525,8 @@ impl<'a, C, A> ManagementAccountUserLinkInsertCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ManageUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14669,7 +14623,7 @@ impl<'a, C, A> ManagementWebpropertyUserLinkInsertCall<'a, C, A> where C: Borrow let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId")].iter() { @@ -14773,42 +14727,41 @@ impl<'a, C, A> ManagementWebpropertyUserLinkInsertCall<'a, C, A> where C: Borrow } + /// /// Sets the *request* property to the given value. /// /// 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: &EntityUserLink) -> ManagementWebpropertyUserLinkInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to create the user link for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to create the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web Property ID to create the user link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web Property ID to create the user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkInsertCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebpropertyUserLinkInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14838,8 +14791,8 @@ impl<'a, C, A> ManagementWebpropertyUserLinkInsertCall<'a, C, A> where C: Borrow /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ManageUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15018,53 +14971,52 @@ impl<'a, C, A> ManagementExperimentDeleteCall<'a, C, A> where C: BorrowMut ManagementExperimentDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to which the experiment belongs + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to which the experiment belongs pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentDeleteCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to which the experiment belongs + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to which the experiment belongs pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// ID of the experiment to delete + /// /// Sets the *experiment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the experiment to delete pub fn experiment_id(mut self, new_value: &str) -> ManagementExperimentDeleteCall<'a, C, A> { self._experiment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementExperimentDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15094,8 +15046,8 @@ impl<'a, C, A> ManagementExperimentDeleteCall<'a, C, A> where C: BorrowMut ManagementProfilePatchCall<'a, C, A> where C: BorrowMut ManagementProfilePatchCall<'a, C, A> where C: BorrowMut ManagementProfilePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to which the view (profile) belongs + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to which the view (profile) belongs pub fn account_id(mut self, new_value: &str) -> ManagementProfilePatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to which the view (profile) belongs + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to which the view (profile) belongs pub fn web_property_id(mut self, new_value: &str) -> ManagementProfilePatchCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// ID of the view (profile) to be updated. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the view (profile) to be updated. pub fn profile_id(mut self, new_value: &str) -> ManagementProfilePatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfilePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15373,8 +15324,8 @@ impl<'a, C, A> ManagementProfilePatchCall<'a, C, A> where C: BorrowMut ManagementFilterGetCall<'a, C, A> where C: BorrowMut ManagementFilterGetCall<'a, C, A> where C: BorrowMut ManagementFilterGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Filter ID to retrieve filters for. + /// /// Sets the *filter id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Filter ID to retrieve filters for. pub fn filter_id(mut self, new_value: &str) -> ManagementFilterGetCall<'a, C, A> { self._filter_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementFilterGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15616,8 +15566,8 @@ impl<'a, C, A> ManagementFilterGetCall<'a, C, A> where C: BorrowMut ManagementWebPropertyAdWordsLinkListCall<'a, C, A> where C: Borro let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::ManageUserReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId")].iter() { @@ -15813,49 +15763,46 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, A> where C: Borro } + /// ID of the account which the given web property belongs to. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the account which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to retrieve the AdWords links for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to retrieve the AdWords links for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first webProperty-AdWords link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of webProperty-AdWords links to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15885,8 +15832,8 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, A> where C: Borro /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15982,7 +15929,7 @@ impl<'a, C, A> ManagementAccountSummaryListCall<'a, C, A> where C: BorrowMut ManagementAccountSummaryListCall<'a, C, A> where C: BorrowMut ManagementAccountSummaryListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of account summaries to include in this response, where the largest acceptable value is 1000. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementAccountSummaryListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementAccountSummaryListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16106,8 +16050,8 @@ impl<'a, C, A> ManagementAccountSummaryListCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionListCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionListCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID for the custom dimensions to retrieve. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID for the custom dimensions to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDimensionListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementCustomDimensionListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of custom dimensions to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementCustomDimensionListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementCustomDimensionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16375,8 +16316,8 @@ impl<'a, C, A> ManagementCustomDimensionListCall<'a, C, A> where C: BorrowMut ManagementUploadListCall<'a, C, A> where C: BorrowMut ManagementUploadListCall<'a, C, A> where C: BorrowMut ManagementUploadListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property Id for the uploads to retrieve. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property Id for the uploads to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementUploadListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Custom data source Id for uploads to retrieve. + /// /// Sets the *custom data source id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom data source Id for uploads to retrieve. pub fn custom_data_source_id(mut self, new_value: &str) -> ManagementUploadListCall<'a, C, A> { self._custom_data_source_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// A 1-based index of the first upload to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementUploadListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of uploads to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementUploadListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementUploadListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16656,8 +16594,8 @@ impl<'a, C, A> ManagementUploadListCall<'a, C, A> where C: BorrowMut ManagementProfileUserLinkListCall<'a, C, A> where C: BorrowMut ManagementProfileUserLinkListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web Property ID which the given view (profile) belongs to. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web Property ID which the given view (profile) belongs to. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileUserLinkListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to retrieve the profile-user links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to retrieve the profile-user links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileUserLinkListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first profile-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementProfileUserLinkListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of profile-user links to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementProfileUserLinkListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileUserLinkListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16937,8 +16872,8 @@ impl<'a, C, A> ManagementProfileUserLinkListCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkListCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first account-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementAccountUserLinkListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of account-user links to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementAccountUserLinkListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementAccountUserLinkListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17194,8 +17126,8 @@ impl<'a, C, A> ManagementAccountUserLinkListCall<'a, C, A> where C: BorrowMut ManagementCustomMetricUpdateCall<'a, C, A> where C: BorrowMut ManagementCustomMetricUpdateCall<'a, C, A> where C: BorrowMut ManagementCustomMetricUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID for the custom metric to update. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID for the custom metric to update. pub fn account_id(mut self, new_value: &str) -> ManagementCustomMetricUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID for the custom metric to update. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID for the custom metric to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomMetricUpdateCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Custom metric ID for the custom metric to update. + /// /// Sets the *custom metric id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom metric ID for the custom metric to update. pub fn custom_metric_id(mut self, new_value: &str) -> ManagementCustomMetricUpdateCall<'a, C, A> { self._custom_metric_id = new_value.to_string(); self } - /// Sets the *ignore custom data source links* query property to the given value. - /// - /// /// Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set. + /// + /// Sets the *ignore custom data source links* query property to the given value. pub fn ignore_custom_data_source_links(mut self, new_value: bool) -> ManagementCustomMetricUpdateCall<'a, C, A> { self._ignore_custom_data_source_links = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementCustomMetricUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17486,8 +17416,8 @@ impl<'a, C, A> ManagementCustomMetricUpdateCall<'a, C, A> where C: BorrowMut ManagementUploadDeleteUploadDataCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &AnalyticsDataimportDeleteUploadDataRequest) -> ManagementUploadDeleteUploadDataCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account Id for the uploads to be deleted. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account Id for the uploads to be deleted. pub fn account_id(mut self, new_value: &str) -> ManagementUploadDeleteUploadDataCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property Id for the uploads to be deleted. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property Id for the uploads to be deleted. pub fn web_property_id(mut self, new_value: &str) -> ManagementUploadDeleteUploadDataCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Custom data source Id for the uploads to be deleted. + /// /// Sets the *custom data source id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Custom data source Id for the uploads to be deleted. pub fn custom_data_source_id(mut self, new_value: &str) -> ManagementUploadDeleteUploadDataCall<'a, C, A> { self._custom_data_source_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementUploadDeleteUploadDataCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17754,8 +17683,8 @@ impl<'a, C, A> ManagementUploadDeleteUploadDataCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17960,62 +17889,61 @@ impl<'a, C, A> ManagementExperimentUpdateCall<'a, C, A> where C: BorrowMut ManagementExperimentUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID of the experiment to update. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID of the experiment to update. pub fn account_id(mut self, new_value: &str) -> ManagementExperimentUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID of the experiment to update. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID of the experiment to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentUpdateCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID of the experiment to update. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID of the experiment to update. pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Experiment ID of the experiment to update. + /// /// Sets the *experiment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Experiment ID of the experiment to update. pub fn experiment_id(mut self, new_value: &str) -> ManagementExperimentUpdateCall<'a, C, A> { self._experiment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementExperimentUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18045,8 +17973,8 @@ impl<'a, C, A> ManagementExperimentUpdateCall<'a, C, A> where C: BorrowMut ManagementGoalUpdateCall<'a, C, A> where C: BorrowMut ManagementGoalUpdateCall<'a, C, A> where C: BorrowMut ManagementGoalUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to update the goal. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to update the goal. pub fn account_id(mut self, new_value: &str) -> ManagementGoalUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to update the goal. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to update the goal. pub fn web_property_id(mut self, new_value: &str) -> ManagementGoalUpdateCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to update the goal. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to update the goal. pub fn profile_id(mut self, new_value: &str) -> ManagementGoalUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Index of the goal to be updated. + /// /// Sets the *goal id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Index of the goal to be updated. pub fn goal_id(mut self, new_value: &str) -> ManagementGoalUpdateCall<'a, C, A> { self._goal_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementGoalUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18336,8 +18263,8 @@ impl<'a, C, A> ManagementGoalUpdateCall<'a, C, A> where C: BorrowMut ManagementCustomDataSourceListCall<'a, C, A> where C: BorrowMut ManagementCustomDataSourceListCall<'a, C, A> where C: BorrowMut ManagementCustomDataSourceListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property Id for the custom data sources to retrieve. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property Id for the custom data sources to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDataSourceListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// A 1-based index of the first custom data source to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementCustomDataSourceListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of custom data sources to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementCustomDataSourceListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementCustomDataSourceListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18605,8 +18529,8 @@ impl<'a, C, A> ManagementCustomDataSourceListCall<'a, C, A> where C: BorrowMut ManagementCustomMetricListCall<'a, C, A> where C: BorrowMut ManagementCustomMetricListCall<'a, C, A> where C: BorrowMut ManagementCustomMetricListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID for the custom metrics to retrieve. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID for the custom metrics to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomMetricListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementCustomMetricListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of custom metrics to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementCustomMetricListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementCustomMetricListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18874,8 +18795,8 @@ impl<'a, C, A> ManagementCustomMetricListCall<'a, C, A> where C: BorrowMut ManagementUnsampledReportListCall<'a, C, A> where C: BorrowMut ManagementUnsampledReportListCall<'a, C, A> where C: BorrowMut ManagementUnsampledReportListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to retrieve unsampled reports for. Must be a specific web property ID, ~all is not supported. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to retrieve unsampled reports for. Must be a specific web property ID, ~all is not supported. pub fn web_property_id(mut self, new_value: &str) -> ManagementUnsampledReportListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to retrieve unsampled reports for. Must be a specific view (profile) ID, ~all is not supported. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to retrieve unsampled reports for. Must be a specific view (profile) ID, ~all is not supported. pub fn profile_id(mut self, new_value: &str) -> ManagementUnsampledReportListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first unsampled report to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementUnsampledReportListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of unsampled reports to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementUnsampledReportListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementUnsampledReportListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19155,8 +19073,8 @@ impl<'a, C, A> ManagementUnsampledReportListCall<'a, C, A> where C: BorrowMut ManagementWebpropertyGetCall<'a, C, A> where C: BorrowMut ManagementWebpropertyGetCall<'a, C, A> where C: BorrowMut ManagementWebpropertyGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// ID to retrieve the web property for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID to retrieve the web property for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyGetCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebpropertyGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19398,8 +19315,8 @@ impl<'a, C, A> ManagementWebpropertyGetCall<'a, C, A> where C: BorrowMut ManagementExperimentInsertCall<'a, C, A> where C: BorrowMut ManagementExperimentInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to create the experiment for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to create the experiment for. pub fn account_id(mut self, new_value: &str) -> ManagementExperimentInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to create the experiment for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to create the experiment for. pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentInsertCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to create the experiment for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to create the experiment for. pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementExperimentInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19677,8 +19593,8 @@ impl<'a, C, A> ManagementExperimentInsertCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionGetCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionGetCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID for the custom dimension to retrieve. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID for the custom dimension to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDimensionGetCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// The ID of the custom dimension to retrieve. + /// /// Sets the *custom dimension id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the custom dimension to retrieve. pub fn custom_dimension_id(mut self, new_value: &str) -> ManagementCustomDimensionGetCall<'a, C, A> { self._custom_dimension_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementCustomDimensionGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19932,8 +19847,8 @@ impl<'a, C, A> ManagementCustomDimensionGetCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkListCall<'a, C, A> where C: BorrowMut< let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::ManageUserReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{profileId}", "profileId")].iter() { @@ -20131,59 +20046,56 @@ impl<'a, C, A> ManagementProfileFilterLinkListCall<'a, C, A> where C: BorrowMut< } + /// Account ID to retrieve profile filter links for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to retrieve profile filter links for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileFilterLinkListCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property Id for profile filter links for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property Id for profile filter links for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkListCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Profile ID to retrieve filter links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Profile ID to retrieve filter links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementProfileFilterLinkListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of profile filter links to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementProfileFilterLinkListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileFilterLinkListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -20213,8 +20125,8 @@ impl<'a, C, A> ManagementProfileFilterLinkListCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -20311,7 +20223,7 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut ManagementWebpropertyPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to which the web property belongs + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to which the web property belongs pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyPatchCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebpropertyPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -20480,8 +20391,8 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionInsertCall<'a, C, A> where C: BorrowMut< let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId")].iter() { @@ -20682,42 +20593,41 @@ impl<'a, C, A> ManagementCustomDimensionInsertCall<'a, C, A> where C: BorrowMut< } + /// /// Sets the *request* property to the given value. /// /// 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: &CustomDimension) -> ManagementCustomDimensionInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID for the custom dimension to create. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID for the custom dimension to create. pub fn account_id(mut self, new_value: &str) -> ManagementCustomDimensionInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID for the custom dimension to create. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID for the custom dimension to create. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDimensionInsertCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementCustomDimensionInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -20747,8 +20657,8 @@ impl<'a, C, A> ManagementCustomDimensionInsertCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Edit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -20845,7 +20755,7 @@ impl<'a, C, A> ManagementCustomMetricInsertCall<'a, C, A> where C: BorrowMut ManagementCustomMetricInsertCall<'a, C, A> where C: BorrowMut ManagementCustomMetricInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID for the custom metric to create. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID for the custom metric to create. pub fn account_id(mut self, new_value: &str) -> ManagementCustomMetricInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID for the custom dimension to create. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID for the custom dimension to create. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomMetricInsertCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementCustomMetricInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21014,8 +20923,8 @@ impl<'a, C, A> ManagementCustomMetricInsertCall<'a, C, A> where C: BorrowMut ManagementProfileUserLinkInsertCall<'a, C, A> where C: BorrowMut< let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{profileId}", "profileId")].iter() { @@ -21218,52 +21127,51 @@ impl<'a, C, A> ManagementProfileUserLinkInsertCall<'a, C, A> where C: BorrowMut< } + /// /// Sets the *request* property to the given value. /// /// 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: &EntityUserLink) -> ManagementProfileUserLinkInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to create the user link for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to create the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileUserLinkInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web Property ID to create the user link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web Property ID to create the user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileUserLinkInsertCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to create the user link for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to create the user link for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileUserLinkInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileUserLinkInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21293,8 +21201,8 @@ impl<'a, C, A> ManagementProfileUserLinkInsertCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ManageUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -21392,7 +21300,7 @@ impl<'a, C, A> ManagementWebpropertyListCall<'a, C, A> where C: BorrowMut ManagementWebpropertyListCall<'a, C, A> where C: BorrowMut ManagementWebpropertyListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementWebpropertyListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of web properties to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementWebpropertyListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebpropertyListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21550,8 +21455,8 @@ impl<'a, C, A> ManagementWebpropertyListCall<'a, C, A> where C: BorrowMut ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> where C: Bor let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId")].iter() { @@ -21752,42 +21657,41 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> where C: Bor } + /// /// Sets the *request* property to the given value. /// /// 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: &EntityAdWordsLink) -> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// ID of the Google Analytics account to create the link for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the Google Analytics account to create the link for. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to create the link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to create the link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21817,8 +21721,8 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> where C: Bor /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Edit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -21917,7 +21821,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> where C: Borr let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{webPropertyAdWordsLinkId}", "webPropertyAdWordsLinkId")].iter() { @@ -22021,52 +21925,51 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> where C: Borr } + /// /// Sets the *request* property to the given value. /// /// 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: &EntityAdWordsLink) -> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// ID of the account which the given web property belongs to. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the account which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to retrieve the AdWords link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to retrieve the AdWords link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Web property-AdWords link ID. + /// /// Sets the *web property ad words link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property-AdWords link ID. pub fn web_property_ad_words_link_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> { self._web_property_ad_words_link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22096,8 +21999,8 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> where C: Borr /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Edit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -22191,7 +22094,7 @@ impl<'a, C, A> ManagementGoalGetCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::ManageUserReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{profileId}", "profileId"), ("{goalId}", "goalId")].iter() { @@ -22287,53 +22190,52 @@ impl<'a, C, A> ManagementGoalGetCall<'a, C, A> where C: BorrowMut } + /// Account ID to retrieve the goal for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to retrieve the goal for. pub fn account_id(mut self, new_value: &str) -> ManagementGoalGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to retrieve the goal for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to retrieve the goal for. pub fn web_property_id(mut self, new_value: &str) -> ManagementGoalGetCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// View (Profile) ID to retrieve the goal for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// View (Profile) ID to retrieve the goal for. pub fn profile_id(mut self, new_value: &str) -> ManagementGoalGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Goal ID to retrieve the goal for. + /// /// Sets the *goal id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Goal ID to retrieve the goal for. pub fn goal_id(mut self, new_value: &str) -> ManagementGoalGetCall<'a, C, A> { self._goal_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementGoalGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22363,8 +22265,8 @@ impl<'a, C, A> ManagementGoalGetCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -22455,7 +22357,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> where C: Bor let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{webPropertyAdWordsLinkId}", "webPropertyAdWordsLinkId")].iter() { @@ -22541,43 +22443,42 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> where C: Bor } + /// ID of the account which the given web property belongs to. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the account which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to delete the AdWords link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to delete the AdWords link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Web property AdWords link ID. + /// /// Sets the *web property ad words link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property AdWords link ID. pub fn web_property_ad_words_link_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> { self._web_property_ad_words_link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22607,8 +22508,8 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> where C: Bor /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Edit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -22707,7 +22608,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> where C: Bor let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId"), ("{webPropertyAdWordsLinkId}", "webPropertyAdWordsLinkId")].iter() { @@ -22811,52 +22712,51 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> where C: Bor } + /// /// Sets the *request* property to the given value. /// /// 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: &EntityAdWordsLink) -> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// ID of the account which the given web property belongs to. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the account which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to retrieve the AdWords link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to retrieve the AdWords link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Web property-AdWords link ID. + /// /// Sets the *web property ad words link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property-AdWords link ID. pub fn web_property_ad_words_link_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> { self._web_property_ad_words_link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22886,8 +22786,8 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> where C: Bor /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Edit`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -22984,7 +22884,7 @@ impl<'a, C, A> ManagementFilterPatchCall<'a, C, A> where C: BorrowMut ManagementFilterPatchCall<'a, C, A> where C: BorrowMut ManagementFilterPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to which the filter belongs. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to which the filter belongs. pub fn account_id(mut self, new_value: &str) -> ManagementFilterPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// ID of the filter to be updated. + /// /// Sets the *filter id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the filter to be updated. pub fn filter_id(mut self, new_value: &str) -> ManagementFilterPatchCall<'a, C, A> { self._filter_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementFilterPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23153,8 +23052,8 @@ impl<'a, C, A> ManagementFilterPatchCall<'a, C, A> where C: BorrowMut ManagementFilterListCall<'a, C, A> where C: BorrowMut ManagementFilterListCall<'a, C, A> where C: BorrowMut ManagementFilterListCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> ManagementFilterListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of filters to include in this response. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagementFilterListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementFilterListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23410,8 +23306,8 @@ impl<'a, C, A> ManagementFilterListCall<'a, C, A> where C: BorrowMut ManagementFilterDeleteCall<'a, C, A> where C: BorrowMut ManagementFilterDeleteCall<'a, C, A> where C: BorrowMut ManagementFilterDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// ID of the filter to be deleted. + /// /// Sets the *filter id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the filter to be deleted. pub fn filter_id(mut self, new_value: &str) -> ManagementFilterDeleteCall<'a, C, A> { self._filter_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementFilterDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23653,8 +23548,8 @@ impl<'a, C, A> ManagementFilterDeleteCall<'a, C, A> where C: BorrowMut ManagementProfileInsertCall<'a, C, A> where C: BorrowMut ManagementProfileInsertCall<'a, C, A> where C: BorrowMut ManagementProfileInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to create the view (profile) for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to create the view (profile) for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileInsertCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to create the view (profile) for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to create the view (profile) for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileInsertCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23920,8 +23814,8 @@ impl<'a, C, A> ManagementProfileInsertCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkDeleteCall<'a, C, A> where C: BorrowMut< let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/entityUserLinks/{linkId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{accountId}", "accountId"), ("{linkId}", "linkId")].iter() { @@ -24096,33 +23990,32 @@ impl<'a, C, A> ManagementAccountUserLinkDeleteCall<'a, C, A> where C: BorrowMut< } + /// Account ID to delete the user link for. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to delete the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementAccountUserLinkDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Link ID to delete the user link for. + /// /// Sets the *link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Link ID to delete the user link for. pub fn link_id(mut self, new_value: &str) -> ManagementAccountUserLinkDeleteCall<'a, C, A> { self._link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementAccountUserLinkDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -24152,8 +24045,8 @@ impl<'a, C, A> ManagementAccountUserLinkDeleteCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ManageUser`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -24252,7 +24145,7 @@ impl<'a, C, A> ManagementProfileUpdateCall<'a, C, A> where C: BorrowMut ManagementProfileUpdateCall<'a, C, A> where C: BorrowMut ManagementProfileUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Account ID to which the view (profile) belongs + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID to which the view (profile) belongs pub fn account_id(mut self, new_value: &str) -> ManagementProfileUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property ID to which the view (profile) belongs + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property ID to which the view (profile) belongs pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileUpdateCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// ID of the view (profile) to be updated. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the view (profile) to be updated. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -24431,8 +24323,8 @@ impl<'a, C, A> ManagementProfileUpdateCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkGetCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkGetCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } + /// Web property Id to retrieve profile filter link for. + /// /// Sets the *web property id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Web property Id to retrieve profile filter link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkGetCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// Profile ID to retrieve filter link for. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Profile ID to retrieve filter link for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// ID of the profile filter link. + /// /// Sets the *link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the profile filter link. pub fn link_id(mut self, new_value: &str) -> ManagementProfileFilterLinkGetCall<'a, C, A> { self._link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagementProfileFilterLinkGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -24698,8 +24589,8 @@ impl<'a, C, A> ManagementProfileFilterLinkGetCall<'a, C, A> where C: BorrowMut DataMcfGetCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/analytics/v3/data/mcf".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::ManageUserReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -24895,101 +24786,94 @@ impl<'a, C, A> DataMcfGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. + /// /// Sets the *ids* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. pub fn ids(mut self, new_value: &str) -> DataMcfGetCall<'a, C, A> { self._ids = new_value.to_string(); self } + /// Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. + /// /// Sets the *start-date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. pub fn start_date(mut self, new_value: &str) -> DataMcfGetCall<'a, C, A> { self._start_date = new_value.to_string(); self } + /// End date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. + /// /// Sets the *end-date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// End date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. pub fn end_date(mut self, new_value: &str) -> DataMcfGetCall<'a, C, A> { self._end_date = new_value.to_string(); self } + /// A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified. + /// /// Sets the *metrics* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified. pub fn metrics(mut self, new_value: &str) -> DataMcfGetCall<'a, C, A> { self._metrics = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> DataMcfGetCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *sort* query property to the given value. - /// - /// /// A comma-separated list of dimensions or metrics that determine the sort order for the Analytics data. + /// + /// Sets the *sort* query property to the given value. pub fn sort(mut self, new_value: &str) -> DataMcfGetCall<'a, C, A> { self._sort = Some(new_value.to_string()); self } - /// Sets the *sampling level* query property to the given value. - /// - /// /// The desired sampling level. + /// + /// Sets the *sampling level* query property to the given value. pub fn sampling_level(mut self, new_value: &str) -> DataMcfGetCall<'a, C, A> { self._sampling_level = Some(new_value.to_string()); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of entries to include in this feed. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> DataMcfGetCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filters* query property to the given value. - /// - /// /// A comma-separated list of dimension or metric filters to be applied to the Analytics data. + /// + /// Sets the *filters* query property to the given value. pub fn filters(mut self, new_value: &str) -> DataMcfGetCall<'a, C, A> { self._filters = Some(new_value.to_string()); self } - /// Sets the *dimensions* query property to the given value. - /// - /// /// A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source,mcf:medium'. + /// + /// Sets the *dimensions* query property to the given value. pub fn dimensions(mut self, new_value: &str) -> DataMcfGetCall<'a, C, A> { self._dimensions = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DataMcfGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -25019,8 +24903,8 @@ impl<'a, C, A> DataMcfGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -25154,7 +25038,7 @@ impl<'a, C, A> DataGaGetCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/analytics/v3/data/ga".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::ManageUserReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -25226,117 +25110,108 @@ impl<'a, C, A> DataGaGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. + /// /// Sets the *ids* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. pub fn ids(mut self, new_value: &str) -> DataGaGetCall<'a, C, A> { self._ids = new_value.to_string(); self } + /// Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. + /// /// Sets the *start-date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. pub fn start_date(mut self, new_value: &str) -> DataGaGetCall<'a, C, A> { self._start_date = new_value.to_string(); self } + /// End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is yesterday. + /// /// Sets the *end-date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is yesterday. pub fn end_date(mut self, new_value: &str) -> DataGaGetCall<'a, C, A> { self._end_date = new_value.to_string(); self } + /// A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified. + /// /// Sets the *metrics* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified. pub fn metrics(mut self, new_value: &str) -> DataGaGetCall<'a, C, A> { self._metrics = new_value.to_string(); self } - /// Sets the *start-index* query property to the given value. - /// - /// /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// + /// Sets the *start-index* query property to the given value. pub fn start_index(mut self, new_value: i32) -> DataGaGetCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *sort* query property to the given value. - /// - /// /// A comma-separated list of dimensions or metrics that determine the sort order for Analytics data. + /// + /// Sets the *sort* query property to the given value. pub fn sort(mut self, new_value: &str) -> DataGaGetCall<'a, C, A> { self._sort = Some(new_value.to_string()); self } - /// Sets the *segment* query property to the given value. - /// - /// /// An Analytics segment to be applied to data. + /// + /// Sets the *segment* query property to the given value. pub fn segment(mut self, new_value: &str) -> DataGaGetCall<'a, C, A> { self._segment = Some(new_value.to_string()); self } - /// Sets the *sampling level* query property to the given value. - /// - /// /// The desired sampling level. + /// + /// Sets the *sampling level* query property to the given value. pub fn sampling_level(mut self, new_value: &str) -> DataGaGetCall<'a, C, A> { self._sampling_level = Some(new_value.to_string()); self } - /// Sets the *output* query property to the given value. - /// - /// /// The selected format for the response. Default format is JSON. + /// + /// Sets the *output* query property to the given value. pub fn output(mut self, new_value: &str) -> DataGaGetCall<'a, C, A> { self._output = Some(new_value.to_string()); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of entries to include in this feed. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> DataGaGetCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filters* query property to the given value. - /// - /// /// A comma-separated list of dimension or metric filters to be applied to Analytics data. + /// + /// Sets the *filters* query property to the given value. pub fn filters(mut self, new_value: &str) -> DataGaGetCall<'a, C, A> { self._filters = Some(new_value.to_string()); self } - /// Sets the *dimensions* query property to the given value. - /// - /// /// A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'. + /// + /// Sets the *dimensions* query property to the given value. pub fn dimensions(mut self, new_value: &str) -> DataGaGetCall<'a, C, A> { self._dimensions = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DataGaGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -25366,8 +25241,8 @@ impl<'a, C, A> DataGaGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -25477,7 +25352,7 @@ impl<'a, C, A> DataRealtimeGetCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/analytics/v3/data/realtime".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::ManageUserReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -25549,65 +25424,60 @@ impl<'a, C, A> DataRealtimeGetCall<'a, C, A> where C: BorrowMut, } + /// Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. + /// /// Sets the *ids* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. pub fn ids(mut self, new_value: &str) -> DataRealtimeGetCall<'a, C, A> { self._ids = new_value.to_string(); self } + /// A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified. + /// /// Sets the *metrics* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified. pub fn metrics(mut self, new_value: &str) -> DataRealtimeGetCall<'a, C, A> { self._metrics = new_value.to_string(); self } - /// Sets the *sort* query property to the given value. - /// - /// /// A comma-separated list of dimensions or metrics that determine the sort order for real time data. + /// + /// Sets the *sort* query property to the given value. pub fn sort(mut self, new_value: &str) -> DataRealtimeGetCall<'a, C, A> { self._sort = Some(new_value.to_string()); self } - /// Sets the *max-results* query property to the given value. - /// - /// /// The maximum number of entries to include in this feed. + /// + /// Sets the *max-results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> DataRealtimeGetCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filters* query property to the given value. - /// - /// /// A comma-separated list of dimension or metric filters to be applied to real time data. + /// + /// Sets the *filters* query property to the given value. pub fn filters(mut self, new_value: &str) -> DataRealtimeGetCall<'a, C, A> { self._filters = Some(new_value.to_string()); self } - /// Sets the *dimensions* query property to the given value. - /// - /// /// A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'. + /// + /// Sets the *dimensions* query property to the given value. pub fn dimensions(mut self, new_value: &str) -> DataRealtimeGetCall<'a, C, A> { self._dimensions = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DataRealtimeGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -25637,8 +25507,8 @@ impl<'a, C, A> DataRealtimeGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -25731,7 +25601,7 @@ impl<'a, C, A> ProvisioningCreateAccountTicketCall<'a, C, A> where C: BorrowMut< let mut url = "https://www.googleapis.com/analytics/v3/provisioning/createAccountTicket".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Provision.as_ref().to_string(), ()); } @@ -25811,22 +25681,21 @@ impl<'a, C, A> ProvisioningCreateAccountTicketCall<'a, C, A> where C: BorrowMut< } + /// /// Sets the *request* property to the given value. /// /// 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: &AccountTicket) -> ProvisioningCreateAccountTicketCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProvisioningCreateAccountTicketCall<'a, C, A> { self._delegate = Some(new_value); self @@ -25856,8 +25725,8 @@ impl<'a, C, A> ProvisioningCreateAccountTicketCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Provision`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -25945,7 +25814,7 @@ impl<'a, C, A> MetadataColumnListCall<'a, C, A> where C: BorrowMut MetadataColumnListCall<'a, C, A> where C: BorrowMut MetadataColumnListCall<'a, C, A> { self._report_type = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MetadataColumnListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -26087,8 +25955,8 @@ impl<'a, C, A> MetadataColumnListCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/androidenterprise1/src/cmn.rs b/gen/androidenterprise1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/androidenterprise1/src/cmn.rs +++ b/gen/androidenterprise1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/androidenterprise1/src/lib.rs b/gen/androidenterprise1/src/lib.rs index 92f6fd6890..00895984bf 100644 --- a/gen/androidenterprise1/src/lib.rs +++ b/gen/androidenterprise1/src/lib.rs @@ -127,16 +127,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -300,16 +302,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -390,7 +394,7 @@ impl<'a, C, A> AndroidEnterprise /// /// * [get app restrictions schema products](struct.ProductGetAppRestrictionsSchemaCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AppRestrictionsSchema { /// The set of restrictions that make up this schema. pub restrictions: Vec, @@ -403,7 +407,7 @@ impl ResponseResult for AppRestrictionsSchema {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AppRestrictionsSchemaRestriction { /// The type of the restriction. #[serde(rename="restrictionType")] @@ -431,7 +435,7 @@ impl Part for AppRestrictionsSchemaRestriction {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AppRestrictionsSchemaRestrictionRestrictionValue { /// The boolean value - this will only be present if type is bool. #[serde(rename="valueBool")] @@ -462,7 +466,7 @@ impl Part for AppRestrictionsSchemaRestrictionRestrictionValue {} /// /// * [list enterprises](struct.EnterpriseListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EnterprisesListResponse { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprisesListResponse". pub kind: String, @@ -519,7 +523,7 @@ impl ResponseResult for Entitlement {} /// /// * [list installs](struct.InstallListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstallsListResponse { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#installsListResponse". pub kind: String, @@ -539,7 +543,7 @@ impl ResponseResult for InstallsListResponse {} /// /// * [list collectionviewers](struct.CollectionviewerListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CollectionViewersListResponse { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collectionViewersListResponse". pub kind: String, @@ -559,7 +563,7 @@ impl ResponseResult for CollectionViewersListResponse {} /// /// * [list devices](struct.DeviceListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DevicesListResponse { /// A managed device. pub device: Vec, @@ -663,7 +667,7 @@ impl ResponseResult for Enterprise {} /// /// * [generate token users](struct.UserGenerateTokenCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserToken { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#userToken". pub kind: String, @@ -757,7 +761,7 @@ impl Part for ProductPermission {} /// * [get app restrictions schema products](struct.ProductGetAppRestrictionsSchemaCall.html) (none) /// * [get permissions products](struct.ProductGetPermissionCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Product { /// A link to an image that can be used as an icon for the product. #[serde(rename="iconUrl")] @@ -796,7 +800,7 @@ impl ResponseResult for Product {} /// /// * [get permissions](struct.PermissionGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Permission { /// An opaque string uniquely identifying the permission. #[serde(rename="permissionId")] @@ -822,7 +826,7 @@ impl ResponseResult for Permission {} /// /// * [list entitlements](struct.EntitlementListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EntitlementsListResponse { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlementsListResponse". pub kind: String, @@ -842,7 +846,7 @@ impl ResponseResult for EntitlementsListResponse {} /// /// * [list users](struct.UserListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UsersListResponse { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#usersListResponse". pub kind: String, @@ -899,7 +903,7 @@ impl ResponseResult for Collection {} /// /// * [list collections](struct.CollectionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CollectionsListResponse { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collectionsListResponse". pub kind: String, @@ -954,7 +958,7 @@ impl ResponseResult for User {} /// /// * [list grouplicenseusers](struct.GrouplicenseuserListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GroupLicenseUsersListResponse { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicenseUsersListResponse". pub kind: String, @@ -1001,7 +1005,7 @@ impl ResponseResult for EnterpriseAccount {} /// * [list devices](struct.DeviceListCall.html) (none) /// * [set state devices](struct.DeviceSetStateCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Device { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device". pub kind: String, @@ -1027,7 +1031,7 @@ impl ResponseResult for Device {} /// /// * [get grouplicenses](struct.GrouplicenseGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GroupLicense { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicense". pub kind: String, @@ -1060,7 +1064,7 @@ impl ResponseResult for GroupLicense {} /// /// * [list grouplicenses](struct.GrouplicenseListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GroupLicensesListResponse { /// A group license for a product approved for use in the enterprise. #[serde(rename="groupLicense")] @@ -2582,43 +2586,42 @@ impl<'a, C, A> CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut CollectionviewerDeleteCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the collection. + /// /// Sets the *collection id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionviewerDeleteCall<'a, C, A> { self._collection_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> CollectionviewerDeleteCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CollectionviewerDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2648,8 +2651,8 @@ impl<'a, C, A> CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut CollectionviewerPatchCall<'a, C, A> where C: BorrowMut CollectionviewerPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionviewerPatchCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the collection. + /// /// Sets the *collection id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionviewerPatchCall<'a, C, A> { self._collection_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> CollectionviewerPatchCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CollectionviewerPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2927,8 +2929,8 @@ impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut CollectionviewerGetCall<'a, C, A> where C: BorrowMut CollectionviewerGetCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the collection. + /// /// Sets the *collection id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionviewerGetCall<'a, C, A> { self._collection_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> CollectionviewerGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CollectionviewerGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3182,8 +3183,8 @@ impl<'a, C, A> CollectionviewerGetCall<'a, C, A> where C: BorrowMut CollectionviewerListCall<'a, C, A> where C: BorrowMut CollectionviewerListCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the collection. + /// /// Sets the *collection id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionviewerListCall<'a, C, A> { self._collection_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CollectionviewerListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3425,8 +3425,8 @@ impl<'a, C, A> CollectionviewerListCall<'a, C, A> where C: BorrowMut CollectionviewerUpdateCall<'a, C, A> where C: BorrowMut CollectionviewerUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionviewerUpdateCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the collection. + /// /// Sets the *collection id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionviewerUpdateCall<'a, C, A> { self._collection_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> CollectionviewerUpdateCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CollectionviewerUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3704,8 +3703,8 @@ impl<'a, C, A> CollectionviewerUpdateCall<'a, C, A> where C: BorrowMut UserRevokeTokenCall<'a, C, A> where C: BorrowMut, } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> UserRevokeTokenCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> UserRevokeTokenCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserRevokeTokenCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3936,8 +3934,8 @@ impl<'a, C, A> UserRevokeTokenCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4123,33 +4121,32 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4179,8 +4176,8 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4366,33 +4363,32 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The exact primary email address of the user to look up. + /// /// Sets the *email* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The exact primary email address of the user to look up. pub fn email(mut self, new_value: &str) -> UserListCall<'a, C, A> { self._email = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4422,8 +4418,8 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4609,33 +4605,32 @@ impl<'a, C, A> UserGenerateTokenCall<'a, C, A> where C: BorrowMut } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> UserGenerateTokenCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> UserGenerateTokenCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserGenerateTokenCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4665,8 +4660,8 @@ impl<'a, C, A> UserGenerateTokenCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4871,62 +4866,61 @@ impl<'a, C, A> InstallPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Install) -> InstallPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> InstallPatchCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> InstallPatchCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The Android ID of the device. + /// /// Sets the *device id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The Android ID of the device. pub fn device_id(mut self, new_value: &str) -> InstallPatchCall<'a, C, A> { self._device_id = new_value.to_string(); self } + /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". + /// /// Sets the *install id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn install_id(mut self, new_value: &str) -> InstallPatchCall<'a, C, A> { self._install_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstallPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4956,8 +4950,8 @@ impl<'a, C, A> InstallPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5147,53 +5141,52 @@ impl<'a, C, A> InstallGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> InstallGetCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> InstallGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The Android ID of the device. + /// /// Sets the *device id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The Android ID of the device. pub fn device_id(mut self, new_value: &str) -> InstallGetCall<'a, C, A> { self._device_id = new_value.to_string(); self } + /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". + /// /// Sets the *install id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn install_id(mut self, new_value: &str) -> InstallGetCall<'a, C, A> { self._install_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstallGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5223,8 +5216,8 @@ impl<'a, C, A> InstallGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5412,43 +5405,42 @@ impl<'a, C, A> InstallListCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> InstallListCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> InstallListCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The Android ID of the device. + /// /// Sets the *device id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The Android ID of the device. pub fn device_id(mut self, new_value: &str) -> InstallListCall<'a, C, A> { self._device_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstallListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5478,8 +5470,8 @@ impl<'a, C, A> InstallListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5658,53 +5650,52 @@ impl<'a, C, A> InstallDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The Android ID of the device. + /// /// Sets the *device id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The Android ID of the device. pub fn device_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { self._device_id = new_value.to_string(); self } + /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". + /// /// Sets the *install id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn install_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { self._install_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstallDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5734,8 +5725,8 @@ impl<'a, C, A> InstallDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5940,62 +5931,61 @@ impl<'a, C, A> InstallUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Install) -> InstallUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> InstallUpdateCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> InstallUpdateCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The Android ID of the device. + /// /// Sets the *device id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The Android ID of the device. pub fn device_id(mut self, new_value: &str) -> InstallUpdateCall<'a, C, A> { self._device_id = new_value.to_string(); self } + /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". + /// /// Sets the *install id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn install_id(mut self, new_value: &str) -> InstallUpdateCall<'a, C, A> { self._install_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstallUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6025,8 +6015,8 @@ impl<'a, C, A> InstallUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6229,52 +6219,51 @@ impl<'a, C, A> DeviceSetStateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &DeviceState) -> DeviceSetStateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> DeviceSetStateCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> DeviceSetStateCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the device. + /// /// Sets the *device id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the device. pub fn device_id(mut self, new_value: &str) -> DeviceSetStateCall<'a, C, A> { self._device_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DeviceSetStateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6304,8 +6293,8 @@ impl<'a, C, A> DeviceSetStateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6493,43 +6482,42 @@ impl<'a, C, A> DeviceGetStateCall<'a, C, A> where C: BorrowMut, A } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> DeviceGetStateCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> DeviceGetStateCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the device. + /// /// Sets the *device id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the device. pub fn device_id(mut self, new_value: &str) -> DeviceGetStateCall<'a, C, A> { self._device_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DeviceGetStateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6559,8 +6547,8 @@ impl<'a, C, A> DeviceGetStateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6746,33 +6734,32 @@ impl<'a, C, A> DeviceListCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> DeviceListCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> DeviceListCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DeviceListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6802,8 +6789,8 @@ impl<'a, C, A> DeviceListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6991,43 +6978,42 @@ impl<'a, C, A> DeviceGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the device. + /// /// Sets the *device id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the device. pub fn device_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, A> { self._device_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DeviceGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7057,8 +7043,8 @@ impl<'a, C, A> DeviceGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7231,23 +7217,22 @@ impl<'a, C, A> EnterpriseUnenrollCall<'a, C, A> where C: BorrowMut EnterpriseUnenrollCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EnterpriseUnenrollCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7277,8 +7262,8 @@ impl<'a, C, A> EnterpriseUnenrollCall<'a, C, A> where C: BorrowMut EnterpriseInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Enterprise) -> EnterpriseInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The token provided by the enterprise to register the MDM. + /// /// Sets the *token* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The token provided by the enterprise to register the MDM. pub fn token(mut self, new_value: &str) -> EnterpriseInsertCall<'a, C, A> { self._token = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EnterpriseInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7508,8 +7492,8 @@ impl<'a, C, A> EnterpriseInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7669,23 +7653,22 @@ impl<'a, C, A> EnterpriseListCall<'a, C, A> where C: BorrowMut, A } + /// The exact primary domain name of the enterprise to look up. + /// /// Sets the *domain* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The exact primary domain name of the enterprise to look up. pub fn domain(mut self, new_value: &str) -> EnterpriseListCall<'a, C, A> { self._domain = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EnterpriseListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7715,8 +7698,8 @@ impl<'a, C, A> EnterpriseListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7900,23 +7883,22 @@ impl<'a, C, A> EnterpriseGetCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EnterpriseGetCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EnterpriseGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7946,8 +7928,8 @@ impl<'a, C, A> EnterpriseGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8122,32 +8104,31 @@ impl<'a, C, A> EnterpriseEnrollCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Enterprise) -> EnterpriseEnrollCall<'a, C, A> { self._request = new_value.clone(); self } + /// The token provided by the enterprise to register the MDM. + /// /// Sets the *token* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The token provided by the enterprise to register the MDM. pub fn token(mut self, new_value: &str) -> EnterpriseEnrollCall<'a, C, A> { self._token = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EnterpriseEnrollCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8177,8 +8158,8 @@ impl<'a, C, A> EnterpriseEnrollCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8377,32 +8358,31 @@ impl<'a, C, A> EnterpriseSetAccountCall<'a, C, A> where C: BorrowMut EnterpriseSetAccountCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EnterpriseSetAccountCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EnterpriseSetAccountCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8432,8 +8412,8 @@ impl<'a, C, A> EnterpriseSetAccountCall<'a, C, A> where C: BorrowMut EnterpriseDeleteCall<'a, C, A> where C: BorrowMut, } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EnterpriseDeleteCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EnterpriseDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8652,8 +8631,8 @@ impl<'a, C, A> EnterpriseDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8852,32 +8831,31 @@ impl<'a, C, A> CollectionInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Collection) -> CollectionInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionInsertCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CollectionInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8907,8 +8885,8 @@ impl<'a, C, A> CollectionInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9109,42 +9087,41 @@ impl<'a, C, A> CollectionPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Collection) -> CollectionPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionPatchCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the collection. + /// /// Sets the *collection id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionPatchCall<'a, C, A> { self._collection_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CollectionPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9174,8 +9151,8 @@ impl<'a, C, A> CollectionPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9376,42 +9353,41 @@ impl<'a, C, A> CollectionUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Collection) -> CollectionUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionUpdateCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the collection. + /// /// Sets the *collection id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionUpdateCall<'a, C, A> { self._collection_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CollectionUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9441,8 +9417,8 @@ impl<'a, C, A> CollectionUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9626,23 +9602,22 @@ impl<'a, C, A> CollectionListCall<'a, C, A> where C: BorrowMut, A } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionListCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CollectionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9672,8 +9647,8 @@ impl<'a, C, A> CollectionListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9859,33 +9834,32 @@ impl<'a, C, A> CollectionGetCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionGetCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the collection. + /// /// Sets the *collection id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionGetCall<'a, C, A> { self._collection_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CollectionGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9915,8 +9889,8 @@ impl<'a, C, A> CollectionGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10091,33 +10065,32 @@ impl<'a, C, A> CollectionDeleteCall<'a, C, A> where C: BorrowMut, } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionDeleteCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the collection. + /// /// Sets the *collection id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionDeleteCall<'a, C, A> { self._collection_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CollectionDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10147,8 +10120,8 @@ impl<'a, C, A> CollectionDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10334,33 +10307,32 @@ impl<'a, C, A> GrouplicenseuserListCall<'a, C, A> where C: BorrowMut GrouplicenseuserListCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the product the group license is for, e.g. "app:com.google.android.gm". + /// /// Sets the *group license id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product the group license is for, e.g. "app:com.google.android.gm". pub fn group_license_id(mut self, new_value: &str) -> GrouplicenseuserListCall<'a, C, A> { self._group_license_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GrouplicenseuserListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10390,8 +10362,8 @@ impl<'a, C, A> GrouplicenseuserListCall<'a, C, A> where C: BorrowMut EntitlementUpdateCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &Entitlement) -> EntitlementUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EntitlementUpdateCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> EntitlementUpdateCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// /// Sets the *entitlement id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn entitlement_id(mut self, new_value: &str) -> EntitlementUpdateCall<'a, C, A> { self._entitlement_id = new_value.to_string(); self } - /// Sets the *install* query property to the given value. - /// - /// /// Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this operation from returning successfully, as long as the entitlement was successfully assigned to the user. + /// + /// Sets the *install* query property to the given value. pub fn install(mut self, new_value: bool) -> EntitlementUpdateCall<'a, C, A> { self._install = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EntitlementUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10682,8 +10652,8 @@ impl<'a, C, A> EntitlementUpdateCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10869,33 +10839,32 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EntitlementListCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> EntitlementListCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EntitlementListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10925,8 +10894,8 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11114,43 +11083,42 @@ impl<'a, C, A> EntitlementGetCall<'a, C, A> where C: BorrowMut, A } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EntitlementGetCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> EntitlementGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// /// Sets the *entitlement id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn entitlement_id(mut self, new_value: &str) -> EntitlementGetCall<'a, C, A> { self._entitlement_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EntitlementGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11180,8 +11148,8 @@ impl<'a, C, A> EntitlementGetCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11389,60 +11357,58 @@ impl<'a, C, A> EntitlementPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Entitlement) -> EntitlementPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EntitlementPatchCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> EntitlementPatchCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// /// Sets the *entitlement id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn entitlement_id(mut self, new_value: &str) -> EntitlementPatchCall<'a, C, A> { self._entitlement_id = new_value.to_string(); self } - /// Sets the *install* query property to the given value. - /// - /// /// Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this operation from returning successfully, as long as the entitlement was successfully assigned to the user. + /// + /// Sets the *install* query property to the given value. pub fn install(mut self, new_value: bool) -> EntitlementPatchCall<'a, C, A> { self._install = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EntitlementPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11472,8 +11438,8 @@ impl<'a, C, A> EntitlementPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11650,43 +11616,42 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the user. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// /// Sets the *entitlement id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn entitlement_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, A> { self._entitlement_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EntitlementDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11716,8 +11681,8 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11903,33 +11868,32 @@ impl<'a, C, A> ProductGetPermissionCall<'a, C, A> where C: BorrowMut ProductGetPermissionCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the product. + /// /// Sets the *product id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductGetPermissionCall<'a, C, A> { self._product_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductGetPermissionCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11959,8 +11923,8 @@ impl<'a, C, A> ProductGetPermissionCall<'a, C, A> where C: BorrowMut ProductGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> ProductGetCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the product, e.g. "app:com.google.android.gm". + /// /// Sets the *product id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product, e.g. "app:com.google.android.gm". pub fn product_id(mut self, new_value: &str) -> ProductGetCall<'a, C, A> { self._product_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> ProductGetCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12215,8 +12177,8 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12407,41 +12369,39 @@ impl<'a, C, A> ProductGetAppRestrictionsSchemaCall<'a, C, A> where C: BorrowMut< } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> ProductGetAppRestrictionsSchemaCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the product. + /// /// Sets the *product id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductGetAppRestrictionsSchemaCall<'a, C, A> { self._product_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> ProductGetAppRestrictionsSchemaCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductGetAppRestrictionsSchemaCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12471,8 +12431,8 @@ impl<'a, C, A> ProductGetAppRestrictionsSchemaCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12673,42 +12633,41 @@ impl<'a, C, A> ProductUpdatePermissionCall<'a, C, A> where C: BorrowMut ProductUpdatePermissionCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> ProductUpdatePermissionCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the product. + /// /// Sets the *product id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductUpdatePermissionCall<'a, C, A> { self._product_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductUpdatePermissionCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12738,8 +12697,8 @@ impl<'a, C, A> ProductUpdatePermissionCall<'a, C, A> where C: BorrowMut GrouplicenseGetCall<'a, C, A> where C: BorrowMut, } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> GrouplicenseGetCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } + /// The ID of the product the group license is for, e.g. "app:com.google.android.gm". + /// /// Sets the *group license id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product the group license is for, e.g. "app:com.google.android.gm". pub fn group_license_id(mut self, new_value: &str) -> GrouplicenseGetCall<'a, C, A> { self._group_license_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GrouplicenseGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12981,8 +12939,8 @@ impl<'a, C, A> GrouplicenseGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13166,23 +13124,22 @@ impl<'a, C, A> GrouplicenseListCall<'a, C, A> where C: BorrowMut, } + /// The ID of the enterprise. + /// /// Sets the *enterprise id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> GrouplicenseListCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GrouplicenseListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13212,8 +13169,8 @@ impl<'a, C, A> GrouplicenseListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13402,31 +13359,29 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the permission. + /// /// Sets the *permission id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the permission. pub fn permission_id(mut self, new_value: &str) -> PermissionGetCall<'a, C, A> { self._permission_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The BCP47 tag for the user's preferred language (e.g. "en-US", "de") + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> PermissionGetCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PermissionGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13456,8 +13411,8 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/androidpublisher2/README.md b/gen/androidpublisher2/README.md index 1a69400655..a543ebf6d0 100644 --- a/gen/androidpublisher2/README.md +++ b/gen/androidpublisher2/README.md @@ -117,16 +117,18 @@ let result = hub.inappproducts().patch(&req, "packageName", "sku") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/androidpublisher2/src/cmn.rs b/gen/androidpublisher2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/androidpublisher2/src/cmn.rs +++ b/gen/androidpublisher2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/androidpublisher2/src/lib.rs b/gen/androidpublisher2/src/lib.rs index 893dbbcdcf..d63e01dafa 100644 --- a/gen/androidpublisher2/src/lib.rs +++ b/gen/androidpublisher2/src/lib.rs @@ -118,16 +118,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -292,16 +294,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -353,7 +357,7 @@ impl<'a, C, A> AndroidPublisher /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InappproductsUpdateResponse { /// no description provided pub inappproduct: InAppProduct, @@ -420,7 +424,7 @@ impl ResponseResult for InAppProduct {} /// /// * [images list edits](struct.EditImageListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImagesListResponse { /// no description provided pub images: Vec, @@ -438,7 +442,7 @@ impl ResponseResult for ImagesListResponse {} /// /// * [expansionfiles upload edits](struct.EditExpansionfileUploadCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExpansionFilesUploadResponse { /// no description provided #[serde(rename="expansionFile")] @@ -538,7 +542,7 @@ impl Part for MonthDay {} /// /// * [products get purchases](struct.PurchaseProductGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductPurchase { /// The consumption state of the inapp product. Possible values are: /// - Yet to be consumed @@ -572,7 +576,7 @@ impl ResponseResult for ProductPurchase {} /// /// * [apklistings list edits](struct.EditApklistingListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ApkListingsListResponse { /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#apkListingsListResponse". pub kind: String, @@ -592,7 +596,7 @@ impl ResponseResult for ApkListingsListResponse {} /// /// * [images deleteall edits](struct.EditImageDeleteallCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImagesDeleteAllResponse { /// no description provided pub deleted: Vec, @@ -681,7 +685,7 @@ impl RequestValue for SubscriptionPurchasesDeferRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InappproductsInsertResponse { /// no description provided pub inappproduct: InAppProduct, @@ -781,7 +785,7 @@ impl ResponseResult for AppDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InappproductsBatchResponseEntry { /// no description provided #[serde(rename="batchId")] @@ -854,7 +858,7 @@ impl Part for InappproductsBatchRequestEntry {} /// /// * [tracks list edits](struct.EditTrackListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TracksListResponse { /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#tracksListResponse". pub kind: String, @@ -874,7 +878,7 @@ impl ResponseResult for TracksListResponse {} /// /// * [subscriptions defer purchases](struct.PurchaseSubscriptionDeferCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SubscriptionPurchasesDeferResponse { /// The new expiry time for the subscription in milliseconds since the Epoch. #[serde(rename="newExpiryTimeMillis")] @@ -893,7 +897,7 @@ impl ResponseResult for SubscriptionPurchasesDeferResponse {} /// /// * [list inappproducts](struct.InappproductListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InappproductsListResponse { /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#inappproductsListResponse". pub kind: String, @@ -914,7 +918,7 @@ impl ResponseResult for InappproductsListResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TokenPagination { /// no description provided #[serde(rename="nextPageToken")] @@ -1010,7 +1014,7 @@ impl ResponseResult for ExpansionFile {} /// /// * [apks addexternallyhosted edits](struct.EditApkAddexternallyhostedCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ApksAddExternallyHostedResponse { /// The definition of the externally-hosted APK and where it is located. #[serde(rename="externallyHostedApk")] @@ -1029,7 +1033,7 @@ impl ResponseResult for ApksAddExternallyHostedResponse {} /// /// * [subscriptions get purchases](struct.PurchaseSubscriptionGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SubscriptionPurchase { /// Whether the subscription will automatically be renewed when it reaches its current expiry time. #[serde(rename="autoRenewing")] @@ -1081,7 +1085,7 @@ impl ResponseResult for AppEdit {} /// /// * [apks list edits](struct.EditApkListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ApksListResponse { /// no description provided pub apks: Vec, @@ -1109,7 +1113,7 @@ impl Part for InappproductsUpdateRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PageInfo { /// no description provided #[serde(rename="resultPerPage")] @@ -1134,7 +1138,7 @@ impl Part for PageInfo {} /// /// * [images upload edits](struct.EditImageUploadCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImagesUploadResponse { /// no description provided pub image: Image, @@ -1152,7 +1156,7 @@ impl ResponseResult for ImagesUploadResponse {} /// /// * [apks upload edits](struct.EditApkUploadCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Apk { /// The version code of the APK, as specified in the APK's manifest file. #[serde(rename="versionCode")] @@ -1173,7 +1177,7 @@ impl ResponseResult for Apk {} /// /// * [batch inappproducts](struct.InappproductBatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InappproductsBatchResponse { /// no description provided pub entrys: Vec, @@ -1188,7 +1192,7 @@ impl ResponseResult for InappproductsBatchResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Image { /// A URL that will serve a preview of the image. pub url: String, @@ -1224,7 +1228,7 @@ impl RequestValue for ApksAddExternallyHostedRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ApkBinary { /// A sha1 hash of the APK payload, encoded as a hex string and matching the output of the sha1sum command. pub sha1: String, @@ -1258,7 +1262,7 @@ impl Part for Price {} /// /// * [listings list edits](struct.EditListingListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListingsListResponse { /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#listingsListResponse". pub kind: String, @@ -2635,43 +2639,42 @@ impl<'a, C, A> PurchaseSubscriptionRevokeCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionRevokeCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// The purchased subscription ID (for example, 'monthly001'). + /// /// Sets the *subscription id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The purchased subscription ID (for example, 'monthly001'). pub fn subscription_id(mut self, new_value: &str) -> PurchaseSubscriptionRevokeCall<'a, C, A> { self._subscription_id = new_value.to_string(); self } + /// The token provided to the user's device when the subscription was purchased. + /// /// Sets the *token* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The token provided to the user's device when the subscription was purchased. pub fn token(mut self, new_value: &str) -> PurchaseSubscriptionRevokeCall<'a, C, A> { self._token = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PurchaseSubscriptionRevokeCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2701,8 +2704,8 @@ impl<'a, C, A> PurchaseSubscriptionRevokeCall<'a, C, A> where C: BorrowMut PurchaseProductGetCall<'a, C, A> where C: BorrowMut PurchaseProductGetCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// The inapp product SKU (for example, 'com.some.thing.inapp1'). + /// /// Sets the *product id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The inapp product SKU (for example, 'com.some.thing.inapp1'). pub fn product_id(mut self, new_value: &str) -> PurchaseProductGetCall<'a, C, A> { self._product_id = new_value.to_string(); self } + /// The token provided to the user's device when the inapp product was purchased. + /// /// Sets the *token* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The token provided to the user's device when the inapp product was purchased. pub fn token(mut self, new_value: &str) -> PurchaseProductGetCall<'a, C, A> { self._token = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PurchaseProductGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2956,8 +2958,8 @@ impl<'a, C, A> PurchaseProductGetCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionGetCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionGetCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// The purchased subscription ID (for example, 'monthly001'). + /// /// Sets the *subscription id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The purchased subscription ID (for example, 'monthly001'). pub fn subscription_id(mut self, new_value: &str) -> PurchaseSubscriptionGetCall<'a, C, A> { self._subscription_id = new_value.to_string(); self } + /// The token provided to the user's device when the subscription was purchased. + /// /// Sets the *token* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The token provided to the user's device when the subscription was purchased. pub fn token(mut self, new_value: &str) -> PurchaseSubscriptionGetCall<'a, C, A> { self._token = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PurchaseSubscriptionGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3211,8 +3212,8 @@ impl<'a, C, A> PurchaseSubscriptionGetCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionCancelCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionCancelCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// The purchased subscription ID (for example, 'monthly001'). + /// /// Sets the *subscription id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The purchased subscription ID (for example, 'monthly001'). pub fn subscription_id(mut self, new_value: &str) -> PurchaseSubscriptionCancelCall<'a, C, A> { self._subscription_id = new_value.to_string(); self } + /// The token provided to the user's device when the subscription was purchased. + /// /// Sets the *token* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The token provided to the user's device when the subscription was purchased. pub fn token(mut self, new_value: &str) -> PurchaseSubscriptionCancelCall<'a, C, A> { self._token = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PurchaseSubscriptionCancelCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3455,8 +3455,8 @@ impl<'a, C, A> PurchaseSubscriptionCancelCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionRefundCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionRefundCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// The purchased subscription ID (for example, 'monthly001'). + /// /// Sets the *subscription id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The purchased subscription ID (for example, 'monthly001'). pub fn subscription_id(mut self, new_value: &str) -> PurchaseSubscriptionRefundCall<'a, C, A> { self._subscription_id = new_value.to_string(); self } + /// The token provided to the user's device when the subscription was purchased. + /// /// Sets the *token* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The token provided to the user's device when the subscription was purchased. pub fn token(mut self, new_value: &str) -> PurchaseSubscriptionRefundCall<'a, C, A> { self._token = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PurchaseSubscriptionRefundCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3699,8 +3698,8 @@ impl<'a, C, A> PurchaseSubscriptionRefundCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionDeferCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionDeferCall<'a, C, A> { self._request = new_value.clone(); self } + /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). pub fn package_name(mut self, new_value: &str) -> PurchaseSubscriptionDeferCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// The purchased subscription ID (for example, 'monthly001'). + /// /// Sets the *subscription id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The purchased subscription ID (for example, 'monthly001'). pub fn subscription_id(mut self, new_value: &str) -> PurchaseSubscriptionDeferCall<'a, C, A> { self._subscription_id = new_value.to_string(); self } + /// The token provided to the user's device when the subscription was purchased. + /// /// Sets the *token* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The token provided to the user's device when the subscription was purchased. pub fn token(mut self, new_value: &str) -> PurchaseSubscriptionDeferCall<'a, C, A> { self._token = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PurchaseSubscriptionDeferCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3978,8 +3976,8 @@ impl<'a, C, A> PurchaseSubscriptionDeferCall<'a, C, A> where C: BorrowMut EditImageUploadCall<'a, C, A> where C: BorrowMut, self.doit(resumeable_stream, mime_type, "resumable") } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditImageUploadCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditImageUploadCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditImageUploadCall<'a, C, A> { self._language = new_value.to_string(); self } + /// /// Sets the *image type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn image_type(mut self, new_value: &str) -> EditImageUploadCall<'a, C, A> { self._image_type = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditImageUploadCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4354,8 +4351,8 @@ impl<'a, C, A> EditImageUploadCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4560,61 +4557,60 @@ impl<'a, C, A> EditExpansionfileUpdateCall<'a, C, A> where C: BorrowMut EditExpansionfileUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditExpansionfileUpdateCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditExpansionfileUpdateCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The version code of the APK whose Expansion File configuration is being read or modified. + /// /// Sets the *apk version code* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The version code of the APK whose Expansion File configuration is being read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditExpansionfileUpdateCall<'a, C, A> { self._apk_version_code = new_value; self } + /// /// Sets the *expansion file type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn expansion_file_type(mut self, new_value: &str) -> EditExpansionfileUpdateCall<'a, C, A> { self._expansion_file_type = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditExpansionfileUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4644,8 +4640,8 @@ impl<'a, C, A> EditExpansionfileUpdateCall<'a, C, A> where C: BorrowMut EditDetailGetCall<'a, C, A> where C: BorrowMut, A: } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditDetailGetCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditDetailGetCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditDetailGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4887,8 +4882,8 @@ impl<'a, C, A> EditDetailGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5067,53 +5062,52 @@ impl<'a, C, A> EditApklistingDeleteCall<'a, C, A> where C: BorrowMut EditApklistingDeleteCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingDeleteCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The APK version code whose APK-specific listings should be read or modified. + /// /// Sets the *apk version code* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingDeleteCall<'a, C, A> { self._apk_version_code = new_value; self } + /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditApklistingDeleteCall<'a, C, A> { self._language = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditApklistingDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5143,8 +5137,8 @@ impl<'a, C, A> EditApklistingDeleteCall<'a, C, A> where C: BorrowMut EditListingDeleteallCall<'a, C, A> where C: BorrowMut EditListingDeleteallCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingDeleteallCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditListingDeleteallCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5375,8 +5368,8 @@ impl<'a, C, A> EditListingDeleteallCall<'a, C, A> where C: BorrowMut EditApkAddexternallyhostedCall<'a, C, A> where C: BorrowMut EditApkAddexternallyhostedCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApkAddexternallyhostedCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApkAddexternallyhostedCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditApkAddexternallyhostedCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5642,8 +5634,8 @@ impl<'a, C, A> EditApkAddexternallyhostedCall<'a, C, A> where C: BorrowMut EditApklistingDeleteallCall<'a, C, A> where C: BorrowMut EditApklistingDeleteallCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingDeleteallCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The APK version code whose APK-specific listings should be read or modified. + /// /// Sets the *apk version code* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingDeleteallCall<'a, C, A> { self._apk_version_code = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditApklistingDeleteallCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5886,8 +5877,8 @@ impl<'a, C, A> EditApklistingDeleteallCall<'a, C, A> where C: BorrowMut EditDetailUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &AppDetails) -> EditDetailUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditDetailUpdateCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditDetailUpdateCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditDetailUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6153,8 +6143,8 @@ impl<'a, C, A> EditDetailUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6342,43 +6332,42 @@ impl<'a, C, A> EditTrackGetCall<'a, C, A> where C: BorrowMut, A: } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTrackGetCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTrackGetCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The track type to read or modify. + /// /// Sets the *track* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The track type to read or modify. pub fn track(mut self, new_value: &str) -> EditTrackGetCall<'a, C, A> { self._track = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditTrackGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6408,8 +6397,8 @@ impl<'a, C, A> EditTrackGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6614,61 +6603,60 @@ impl<'a, C, A> EditExpansionfilePatchCall<'a, C, A> where C: BorrowMut EditExpansionfilePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditExpansionfilePatchCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditExpansionfilePatchCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The version code of the APK whose Expansion File configuration is being read or modified. + /// /// Sets the *apk version code* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The version code of the APK whose Expansion File configuration is being read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditExpansionfilePatchCall<'a, C, A> { self._apk_version_code = new_value; self } + /// /// Sets the *expansion file type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn expansion_file_type(mut self, new_value: &str) -> EditExpansionfilePatchCall<'a, C, A> { self._expansion_file_type = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditExpansionfilePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6698,8 +6686,8 @@ impl<'a, C, A> EditExpansionfilePatchCall<'a, C, A> where C: BorrowMut EditImageListCall<'a, C, A> where C: BorrowMut, A: } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditImageListCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditImageListCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditImageListCall<'a, C, A> { self._language = new_value.to_string(); self } + /// /// Sets the *image type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn image_type(mut self, new_value: &str) -> EditImageListCall<'a, C, A> { self._image_type = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditImageListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6964,8 +6951,8 @@ impl<'a, C, A> EditImageListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7168,52 +7155,51 @@ impl<'a, C, A> EditTrackUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Track) -> EditTrackUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTrackUpdateCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTrackUpdateCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The track type to read or modify. + /// /// Sets the *track* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The track type to read or modify. pub fn track(mut self, new_value: &str) -> EditTrackUpdateCall<'a, C, A> { self._track = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditTrackUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7243,8 +7229,8 @@ impl<'a, C, A> EditTrackUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7447,52 +7433,51 @@ impl<'a, C, A> EditListingPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Listing) -> EditListingPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditListingPatchCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingPatchCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditListingPatchCall<'a, C, A> { self._language = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditListingPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7522,8 +7507,8 @@ impl<'a, C, A> EditListingPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7709,33 +7694,32 @@ impl<'a, C, A> EditGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditGetCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditGetCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7765,8 +7749,8 @@ impl<'a, C, A> EditGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7947,62 +7931,61 @@ impl<'a, C, A> EditImageDeleteCall<'a, C, A> where C: BorrowMut, } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditImageDeleteCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditImageDeleteCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditImageDeleteCall<'a, C, A> { self._language = new_value.to_string(); self } + /// /// Sets the *image type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn image_type(mut self, new_value: &str) -> EditImageDeleteCall<'a, C, A> { self._image_type = new_value.to_string(); self } + /// Unique identifier an image within the set of images attached to this edit. + /// /// Sets the *image id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier an image within the set of images attached to this edit. pub fn image_id(mut self, new_value: &str) -> EditImageDeleteCall<'a, C, A> { self._image_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditImageDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8032,8 +8015,8 @@ impl<'a, C, A> EditImageDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8327,33 +8310,32 @@ impl<'a, C, A> EditApkUploadCall<'a, C, A> where C: BorrowMut, A: self.doit(resumeable_stream, mime_type, "resumable") } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApkUploadCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApkUploadCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditApkUploadCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8383,8 +8365,8 @@ impl<'a, C, A> EditApkUploadCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8589,62 +8571,61 @@ impl<'a, C, A> EditApklistingUpdateCall<'a, C, A> where C: BorrowMut EditApklistingUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApklistingUpdateCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingUpdateCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The APK version code whose APK-specific listings should be read or modified. + /// /// Sets the *apk version code* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingUpdateCall<'a, C, A> { self._apk_version_code = new_value; self } + /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditApklistingUpdateCall<'a, C, A> { self._language = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditApklistingUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8674,8 +8655,8 @@ impl<'a, C, A> EditApklistingUpdateCall<'a, C, A> where C: BorrowMut EditApkListCall<'a, C, A> where C: BorrowMut, A: o } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApkListCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApkListCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditApkListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8915,8 +8895,8 @@ impl<'a, C, A> EditApkListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9121,62 +9101,61 @@ impl<'a, C, A> EditApklistingPatchCall<'a, C, A> where C: BorrowMut EditApklistingPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApklistingPatchCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingPatchCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The APK version code whose APK-specific listings should be read or modified. + /// /// Sets the *apk version code* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingPatchCall<'a, C, A> { self._apk_version_code = new_value; self } + /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditApklistingPatchCall<'a, C, A> { self._language = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditApklistingPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9206,8 +9185,8 @@ impl<'a, C, A> EditApklistingPatchCall<'a, C, A> where C: BorrowMut EditListingGetCall<'a, C, A> where C: BorrowMut, A } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditListingGetCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingGetCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditListingGetCall<'a, C, A> { self._language = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditListingGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9461,8 +9439,8 @@ impl<'a, C, A> EditListingGetCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9648,42 +9626,41 @@ impl<'a, C, A> EditTesterGetCall<'a, C, A> where C: BorrowMut, A: } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTesterGetCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTesterGetCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// /// Sets the *track* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn track(mut self, new_value: &str) -> EditTesterGetCall<'a, C, A> { self._track = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditTesterGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9713,8 +9690,8 @@ impl<'a, C, A> EditTesterGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9889,33 +9866,32 @@ impl<'a, C, A> EditDeleteCall<'a, C, A> where C: BorrowMut, A: oa } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditDeleteCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditDeleteCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9945,8 +9921,8 @@ impl<'a, C, A> EditDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10246,52 +10222,51 @@ impl<'a, C, A> EditExpansionfileUploadCall<'a, C, A> where C: BorrowMut EditExpansionfileUploadCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditExpansionfileUploadCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The version code of the APK whose Expansion File configuration is being read or modified. + /// /// Sets the *apk version code* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The version code of the APK whose Expansion File configuration is being read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditExpansionfileUploadCall<'a, C, A> { self._apk_version_code = new_value; self } + /// /// Sets the *expansion file type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn expansion_file_type(mut self, new_value: &str) -> EditExpansionfileUploadCall<'a, C, A> { self._expansion_file_type = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditExpansionfileUploadCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10321,8 +10296,8 @@ impl<'a, C, A> EditExpansionfileUploadCall<'a, C, A> where C: BorrowMut EditInsertCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &AppEdit) -> EditInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditInsertCall<'a, C, A> { self._package_name = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10576,8 +10550,8 @@ impl<'a, C, A> EditInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10763,33 +10737,32 @@ impl<'a, C, A> EditListingListCall<'a, C, A> where C: BorrowMut, } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditListingListCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingListCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditListingListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10819,8 +10792,8 @@ impl<'a, C, A> EditListingListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11021,51 +10994,50 @@ impl<'a, C, A> EditTesterPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Testers) -> EditTesterPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTesterPatchCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTesterPatchCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// /// Sets the *track* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn track(mut self, new_value: &str) -> EditTesterPatchCall<'a, C, A> { self._track = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditTesterPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11095,8 +11067,8 @@ impl<'a, C, A> EditTesterPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11282,33 +11254,32 @@ impl<'a, C, A> EditCommitCall<'a, C, A> where C: BorrowMut, A: oa } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditCommitCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditCommitCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditCommitCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11338,8 +11309,8 @@ impl<'a, C, A> EditCommitCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11525,33 +11496,32 @@ impl<'a, C, A> EditTrackListCall<'a, C, A> where C: BorrowMut, A: } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTrackListCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTrackListCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditTrackListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11581,8 +11551,8 @@ impl<'a, C, A> EditTrackListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11768,33 +11738,32 @@ impl<'a, C, A> EditValidateCall<'a, C, A> where C: BorrowMut, A: } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditValidateCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditValidateCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditValidateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11824,8 +11793,8 @@ impl<'a, C, A> EditValidateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12028,52 +11997,51 @@ impl<'a, C, A> EditListingUpdateCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &Listing) -> EditListingUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditListingUpdateCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingUpdateCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditListingUpdateCall<'a, C, A> { self._language = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditListingUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12103,8 +12071,8 @@ impl<'a, C, A> EditListingUpdateCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12294,52 +12262,51 @@ impl<'a, C, A> EditExpansionfileGetCall<'a, C, A> where C: BorrowMut EditExpansionfileGetCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditExpansionfileGetCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The version code of the APK whose Expansion File configuration is being read or modified. + /// /// Sets the *apk version code* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The version code of the APK whose Expansion File configuration is being read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditExpansionfileGetCall<'a, C, A> { self._apk_version_code = new_value; self } + /// /// Sets the *expansion file type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn expansion_file_type(mut self, new_value: &str) -> EditExpansionfileGetCall<'a, C, A> { self._expansion_file_type = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditExpansionfileGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12369,8 +12336,8 @@ impl<'a, C, A> EditExpansionfileGetCall<'a, C, A> where C: BorrowMut EditImageDeleteallCall<'a, C, A> where C: BorrowMut EditImageDeleteallCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditImageDeleteallCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditImageDeleteallCall<'a, C, A> { self._language = new_value.to_string(); self } + /// /// Sets the *image type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn image_type(mut self, new_value: &str) -> EditImageDeleteallCall<'a, C, A> { self._image_type = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditImageDeleteallCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12635,8 +12601,8 @@ impl<'a, C, A> EditImageDeleteallCall<'a, C, A> where C: BorrowMut EditDetailPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &AppDetails) -> EditDetailPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditDetailPatchCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditDetailPatchCall<'a, C, A> { self._edit_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditDetailPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12902,8 +12867,8 @@ impl<'a, C, A> EditDetailPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13106,52 +13071,51 @@ impl<'a, C, A> EditTrackPatchCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Track) -> EditTrackPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTrackPatchCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTrackPatchCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The track type to read or modify. + /// /// Sets the *track* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The track type to read or modify. pub fn track(mut self, new_value: &str) -> EditTrackPatchCall<'a, C, A> { self._track = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditTrackPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13181,8 +13145,8 @@ impl<'a, C, A> EditTrackPatchCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13359,43 +13323,42 @@ impl<'a, C, A> EditListingDeleteCall<'a, C, A> where C: BorrowMut } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditListingDeleteCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingDeleteCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditListingDeleteCall<'a, C, A> { self._language = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditListingDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13425,8 +13388,8 @@ impl<'a, C, A> EditListingDeleteCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13616,53 +13579,52 @@ impl<'a, C, A> EditApklistingGetCall<'a, C, A> where C: BorrowMut } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApklistingGetCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingGetCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The APK version code whose APK-specific listings should be read or modified. + /// /// Sets the *apk version code* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingGetCall<'a, C, A> { self._apk_version_code = new_value; self } + /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// /// Sets the *language* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditApklistingGetCall<'a, C, A> { self._language = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditApklistingGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13692,8 +13654,8 @@ impl<'a, C, A> EditApklistingGetCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13894,51 +13856,50 @@ impl<'a, C, A> EditTesterUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Testers) -> EditTesterUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTesterUpdateCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTesterUpdateCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// /// Sets the *track* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn track(mut self, new_value: &str) -> EditTesterUpdateCall<'a, C, A> { self._track = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditTesterUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13968,8 +13929,8 @@ impl<'a, C, A> EditTesterUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14157,43 +14118,42 @@ impl<'a, C, A> EditApklistingListCall<'a, C, A> where C: BorrowMut EditApklistingListCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for this edit. + /// /// Sets the *edit id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingListCall<'a, C, A> { self._edit_id = new_value.to_string(); self } + /// The APK version code whose APK-specific listings should be read or modified. + /// /// Sets the *apk version code* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingListCall<'a, C, A> { self._apk_version_code = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EditApklistingListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14223,8 +14183,8 @@ impl<'a, C, A> EditApklistingListCall<'a, C, A> where C: BorrowMut InappproductBatchCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &InappproductsBatchRequest) -> InappproductBatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InappproductBatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14440,8 +14399,8 @@ impl<'a, C, A> InappproductBatchCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14640,44 +14599,40 @@ impl<'a, C, A> InappproductListCall<'a, C, A> where C: BorrowMut, } + /// Unique identifier for the Android app with in-app products; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app with in-app products; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> InappproductListCall<'a, C, A> { self._package_name = new_value.to_string(); self } - /// Sets the *token* query property to the given value. /// - /// + /// Sets the *token* query property to the given value. pub fn token(mut self, new_value: &str) -> InappproductListCall<'a, C, A> { self._token = Some(new_value.to_string()); self } - /// Sets the *start index* query property to the given value. /// - /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: u32) -> InappproductListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *max results* query property to the given value. /// - /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> InappproductListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InappproductListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14707,8 +14662,8 @@ impl<'a, C, A> InappproductListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14912,40 +14867,38 @@ impl<'a, C, A> InappproductInsertCall<'a, C, A> where C: BorrowMut InappproductInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> InappproductInsertCall<'a, C, A> { self._package_name = new_value.to_string(); self } - /// Sets the *auto convert missing prices* query property to the given value. - /// - /// /// If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. + /// + /// Sets the *auto convert missing prices* query property to the given value. pub fn auto_convert_missing_prices(mut self, new_value: bool) -> InappproductInsertCall<'a, C, A> { self._auto_convert_missing_prices = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InappproductInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14975,8 +14928,8 @@ impl<'a, C, A> InappproductInsertCall<'a, C, A> where C: BorrowMut InappproductDeleteCall<'a, C, A> where C: BorrowMut InappproductDeleteCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for the in-app product. + /// /// Sets the *sku* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the in-app product. pub fn sku(mut self, new_value: &str) -> InappproductDeleteCall<'a, C, A> { self._sku = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InappproductDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15207,8 +15159,8 @@ impl<'a, C, A> InappproductDeleteCall<'a, C, A> where C: BorrowMut InappproductGetCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn package_name(mut self, new_value: &str) -> InappproductGetCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for the in-app product. + /// /// Sets the *sku* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the in-app product. pub fn sku(mut self, new_value: &str) -> InappproductGetCall<'a, C, A> { self._sku = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InappproductGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15449,8 +15400,8 @@ impl<'a, C, A> InappproductGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15656,50 +15607,48 @@ impl<'a, C, A> InappproductUpdateCall<'a, C, A> where C: BorrowMut InappproductUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> InappproductUpdateCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for the in-app product. + /// /// Sets the *sku* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the in-app product. pub fn sku(mut self, new_value: &str) -> InappproductUpdateCall<'a, C, A> { self._sku = new_value.to_string(); self } - /// Sets the *auto convert missing prices* query property to the given value. - /// - /// /// If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. + /// + /// Sets the *auto convert missing prices* query property to the given value. pub fn auto_convert_missing_prices(mut self, new_value: bool) -> InappproductUpdateCall<'a, C, A> { self._auto_convert_missing_prices = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InappproductUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15729,8 +15678,8 @@ impl<'a, C, A> InappproductUpdateCall<'a, C, A> where C: BorrowMut InappproductPatchCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &InAppProduct) -> InappproductPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". + /// /// Sets the *package name* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> InappproductPatchCall<'a, C, A> { self._package_name = new_value.to_string(); self } + /// Unique identifier for the in-app product. + /// /// Sets the *sku* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Unique identifier for the in-app product. pub fn sku(mut self, new_value: &str) -> InappproductPatchCall<'a, C, A> { self._sku = new_value.to_string(); self } - /// Sets the *auto convert missing prices* query property to the given value. - /// - /// /// If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. + /// + /// Sets the *auto convert missing prices* query property to the given value. pub fn auto_convert_missing_prices(mut self, new_value: bool) -> InappproductPatchCall<'a, C, A> { self._auto_convert_missing_prices = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InappproductPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16009,8 +15956,8 @@ impl<'a, C, A> InappproductPatchCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/appsactivity1/README.md b/gen/appsactivity1/README.md index 1528b55633..fdef1c37f4 100644 --- a/gen/appsactivity1/README.md +++ b/gen/appsactivity1/README.md @@ -104,16 +104,18 @@ let result = hub.activities().list() match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/appsactivity1/src/cmn.rs b/gen/appsactivity1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/appsactivity1/src/cmn.rs +++ b/gen/appsactivity1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/appsactivity1/src/lib.rs b/gen/appsactivity1/src/lib.rs index 70150be9f7..9a33b9dea2 100644 --- a/gen/appsactivity1/src/lib.rs +++ b/gen/appsactivity1/src/lib.rs @@ -105,16 +105,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -291,16 +293,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -346,7 +350,7 @@ impl<'a, C, A> Appsactivity /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Rename { /// The new title. #[serde(rename="newTitle")] @@ -363,7 +367,7 @@ impl Part for Rename {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PermissionChange { /// Lists all Permission objects removed. #[serde(rename="removedPermissions")] @@ -380,7 +384,7 @@ impl Part for PermissionChange {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Target { /// The MIME type of the target. #[serde(rename="mimeType")] @@ -398,7 +402,7 @@ impl Part for Target {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Parent { /// The parent's ID. pub id: String, @@ -416,7 +420,7 @@ impl Part for Parent {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Permission { /// Whether the permission requires a link to the file. #[serde(rename="withLink")] @@ -442,7 +446,7 @@ impl Part for Permission {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Photo { /// The URL of the photo. pub url: String, @@ -455,7 +459,7 @@ impl Part for Photo {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Move { /// The removed parent(s). #[serde(rename="removedParents")] @@ -477,7 +481,7 @@ impl Part for Move {} /// /// * [list activities](struct.ActivityListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListActivitiesResponse { /// Token for the next page of results. #[serde(rename="nextPageToken")] @@ -493,7 +497,7 @@ impl ResponseResult for ListActivitiesResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct User { /// The profile photo of the user. pub photo: Photo, @@ -508,7 +512,7 @@ impl Part for User {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Activity { /// The fields common to all of the singleEvents that make up the Activity. #[serde(rename="combinedEvent")] @@ -525,7 +529,7 @@ impl Part for Activity {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Event { /// Extra information for rename type events, such as the old and new names. pub rename: Rename, @@ -804,70 +808,62 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: } - /// Sets the *user id* query property to the given value. - /// - /// /// Indicates the user to return activity for. Use the special value me to indicate the currently authenticated user. + /// + /// Sets the *user id* query property to the given value. pub fn user_id(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._user_id = Some(new_value.to_string()); self } - /// Sets the *source* query property to the given value. - /// - /// /// The Google service from which to return activities. Possible values of source are: /// - drive.google.com + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// A token to retrieve a specific page of results. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *page size* query property to the given value. - /// - /// /// The maximum number of events to return on a page. The response includes a continuation token if there are more events. + /// + /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> ActivityListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// Sets the *grouping strategy* query property to the given value. - /// - /// /// Indicates the strategy to use when grouping singleEvents items in the associated combinedEvent object. + /// + /// Sets the *grouping strategy* query property to the given value. pub fn grouping_strategy(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._grouping_strategy = Some(new_value.to_string()); self } - /// Sets the *drive.file id* query property to the given value. - /// - /// /// Identifies the Drive item to return activities for. + /// + /// Sets the *drive.file id* query property to the given value. pub fn drive_file_id(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._drive_file_id = Some(new_value.to_string()); self } - /// Sets the *drive.ancestor id* query property to the given value. - /// - /// /// Identifies the Drive folder containing the items for which to return activities. + /// + /// Sets the *drive.ancestor id* query property to the given value. pub fn drive_ancestor_id(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._drive_ancestor_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ActivityListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -897,8 +893,8 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DriveMetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/appstate1/README.md b/gen/appstate1/README.md index 884521cc1b..5d6657648e 100644 --- a/gen/appstate1/README.md +++ b/gen/appstate1/README.md @@ -105,16 +105,18 @@ let result = hub.states().update(&req, -39) match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/appstate1/src/cmn.rs b/gen/appstate1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/appstate1/src/cmn.rs +++ b/gen/appstate1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/appstate1/src/lib.rs b/gen/appstate1/src/lib.rs index 8dca5708fc..80d095afb2 100644 --- a/gen/appstate1/src/lib.rs +++ b/gen/appstate1/src/lib.rs @@ -106,16 +106,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -280,16 +282,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -340,7 +344,7 @@ impl<'a, C, A> AppState /// /// * [list states](struct.StateListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListResponse { /// The app state data. pub items: Vec, @@ -363,7 +367,7 @@ impl ResponseResult for ListResponse {} /// /// * [get states](struct.StateGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GetResponse { /// The requested data. pub data: String, @@ -410,7 +414,7 @@ impl RequestValue for UpdateRequest {} /// * [clear states](struct.StateClearCall.html) (response) /// * [update states](struct.StateUpdateCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct WriteResult { /// Uniquely identifies the type of this resource. Value is always the fixed string appstate#writeResult. pub kind: String, @@ -719,23 +723,22 @@ impl<'a, C, A> StateDeleteCall<'a, C, A> where C: BorrowMut, A: o } + /// The key for the data to be retrieved. + /// /// Sets the *state key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The key for the data to be retrieved. pub fn state_key(mut self, new_value: i32) -> StateDeleteCall<'a, C, A> { self._state_key = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StateDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -765,8 +768,8 @@ impl<'a, C, A> StateDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -950,23 +953,22 @@ impl<'a, C, A> StateGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// The key for the data to be retrieved. + /// /// Sets the *state key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The key for the data to be retrieved. pub fn state_key(mut self, new_value: i32) -> StateGetCall<'a, C, A> { self._state_key = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StateGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -996,8 +998,8 @@ impl<'a, C, A> StateGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1186,31 +1188,29 @@ impl<'a, C, A> StateClearCall<'a, C, A> where C: BorrowMut, A: oa } + /// The key for the data to be retrieved. + /// /// Sets the *state key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The key for the data to be retrieved. pub fn state_key(mut self, new_value: i32) -> StateClearCall<'a, C, A> { self._state_key = new_value; self } - /// Sets the *current data version* query property to the given value. - /// - /// /// The version of the data to be cleared. Version strings are returned by the server. + /// + /// Sets the *current data version* query property to the given value. pub fn current_data_version(mut self, new_value: &str) -> StateClearCall<'a, C, A> { self._current_data_version = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StateClearCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1240,8 +1240,8 @@ impl<'a, C, A> StateClearCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1404,21 +1404,19 @@ impl<'a, C, A> StateListCall<'a, C, A> where C: BorrowMut, A: oau } - /// Sets the *include data* query property to the given value. - /// - /// /// Whether to include the full data in addition to the version number + /// + /// Sets the *include data* query property to the given value. pub fn include_data(mut self, new_value: bool) -> StateListCall<'a, C, A> { self._include_data = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StateListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1448,8 +1446,8 @@ impl<'a, C, A> StateListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1653,40 +1651,38 @@ impl<'a, C, A> StateUpdateCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &UpdateRequest) -> StateUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The key for the data to be retrieved. + /// /// Sets the *state key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The key for the data to be retrieved. pub fn state_key(mut self, new_value: i32) -> StateUpdateCall<'a, C, A> { self._state_key = new_value; self } - /// Sets the *current state version* query property to the given value. - /// - /// /// The version of the app state your application is attempting to update. If this does not match the current version, this method will return a conflict error. If there is no data stored on the server for this key, the update will succeed irrespective of the value of this parameter. + /// + /// Sets the *current state version* query property to the given value. pub fn current_state_version(mut self, new_value: &str) -> StateUpdateCall<'a, C, A> { self._current_state_version = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StateUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1716,8 +1712,8 @@ impl<'a, C, A> StateUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/audit1/README.md b/gen/audit1/README.md index 4348703fc3..b48b7ed3e4 100644 --- a/gen/audit1/README.md +++ b/gen/audit1/README.md @@ -106,16 +106,18 @@ let result = hub.activities().list("customerId", "applicationId") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/audit1/src/cmn.rs b/gen/audit1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/audit1/src/cmn.rs +++ b/gen/audit1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/audit1/src/lib.rs b/gen/audit1/src/lib.rs index 6ef6f2a530..71085373e1 100644 --- a/gen/audit1/src/lib.rs +++ b/gen/audit1/src/lib.rs @@ -107,16 +107,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -261,16 +263,18 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -321,7 +325,7 @@ impl<'a, C, A> Audit /// /// * [list activities](struct.ActivityListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Activities { /// Each record in read response. pub items: Vec, @@ -338,7 +342,7 @@ impl ResponseResult for Activities {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityActor { /// ID of application which interacted on behalf of the user. #[serde(rename="applicationId")] @@ -360,7 +364,7 @@ impl Part for ActivityActor {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityId { /// Unique qualifier if multiple events have the same time. #[serde(rename="uniqQualifier")] @@ -383,7 +387,7 @@ impl Part for ActivityId {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Activity { /// Kind of resource this is. pub kind: String, @@ -408,7 +412,7 @@ impl Part for Activity {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityEventsParameters { /// Name of the parameter. pub name: String, @@ -424,7 +428,7 @@ impl Part for ActivityEventsParameters {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ActivityEvents { /// Type of event. #[serde(rename="eventType")] @@ -730,105 +734,95 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: } + /// Represents the customer who is the owner of target object on which action was performed. + /// /// Sets the *customer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Represents the customer who is the owner of target object on which action was performed. pub fn customer_id(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._customer_id = new_value.to_string(); self } + /// Application ID of the application on which the event was performed. + /// /// Sets the *application id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Application ID of the application on which the event was performed. pub fn application_id(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._application_id = new_value.to_string(); self } - /// Sets the *start time* query property to the given value. - /// - /// /// Return events which occured at or after this time. + /// + /// Sets the *start time* query property to the given value. pub fn start_time(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._start_time = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Number of activity records to be shown in each page. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ActivityListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *event name* query property to the given value. - /// - /// /// Name of the event being queried. + /// + /// Sets the *event name* query property to the given value. pub fn event_name(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._event_name = Some(new_value.to_string()); self } - /// Sets the *end time* query property to the given value. - /// - /// /// Return events which occured at or before this time. + /// + /// Sets the *end time* query property to the given value. pub fn end_time(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._end_time = Some(new_value.to_string()); self } - /// Sets the *continuation token* query property to the given value. - /// - /// /// Next page URL. + /// + /// Sets the *continuation token* query property to the given value. pub fn continuation_token(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._continuation_token = Some(new_value.to_string()); self } - /// Sets the *caller* query property to the given value. - /// - /// /// Type of the caller. + /// + /// Sets the *caller* query property to the given value. pub fn caller(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._caller = Some(new_value.to_string()); self } - /// Sets the *actor ip address* query property to the given value. - /// - /// /// IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses. + /// + /// Sets the *actor ip address* query property to the given value. pub fn actor_ip_address(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._actor_ip_address = Some(new_value.to_string()); self } - /// Sets the *actor email* query property to the given value. - /// - /// /// Email address of the user who performed the action. + /// + /// Sets the *actor email* query property to the given value. pub fn actor_email(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._actor_email = Some(new_value.to_string()); self } - /// Sets the *actor application id* query property to the given value. - /// - /// /// Application ID of the application which interacted on behalf of the user while performing the event. + /// + /// Sets the *actor application id* query property to the given value. pub fn actor_application_id(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { self._actor_application_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ActivityListCall<'a, C, A> { self._delegate = Some(new_value); self diff --git a/gen/autoscaler1_beta2/README.md b/gen/autoscaler1_beta2/README.md index 07f8eaa59f..801fb54962 100644 --- a/gen/autoscaler1_beta2/README.md +++ b/gen/autoscaler1_beta2/README.md @@ -109,16 +109,18 @@ let result = hub.autoscalers().list("project", "zone") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/autoscaler1_beta2/src/cmn.rs b/gen/autoscaler1_beta2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/autoscaler1_beta2/src/cmn.rs +++ b/gen/autoscaler1_beta2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/autoscaler1_beta2/src/lib.rs b/gen/autoscaler1_beta2/src/lib.rs index e84038abdd..fa1febab83 100644 --- a/gen/autoscaler1_beta2/src/lib.rs +++ b/gen/autoscaler1_beta2/src/lib.rs @@ -110,16 +110,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -284,16 +286,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -345,7 +349,7 @@ impl<'a, C, A> AutoscalerHub /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DeprecationStatus { /// no description provided pub deleted: String, @@ -366,7 +370,7 @@ impl Part for DeprecationStatus {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationWarningsData { /// no description provided pub key: String, @@ -387,7 +391,7 @@ impl Part for OperationWarningsData {} /// /// * [list zones](struct.ZoneListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Zone { /// no description provided pub status: Option, @@ -421,7 +425,7 @@ impl Resource for Zone {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationWarnings { /// no description provided pub message: String, @@ -444,7 +448,7 @@ impl Part for OperationWarnings {} /// /// * [list zone operations](struct.ZoneOperationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationList { /// no description provided #[serde(rename="nextPageToken")] @@ -467,7 +471,7 @@ impl ResponseResult for OperationList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ZoneMaintenanceWindows { /// no description provided #[serde(rename="endTime")] @@ -508,7 +512,7 @@ impl Part for AutoscalingPolicyCustomMetricUtilization {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationErrorErrors { /// no description provided pub message: String, @@ -555,7 +559,7 @@ impl Part for AutoscalingPolicy {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationError { /// no description provided pub errors: Vec, @@ -602,7 +606,7 @@ impl Part for AutoscalingPolicyLoadBalancingUtilization {} /// /// * [list autoscalers](struct.AutoscalerListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AutoscalerListResponse { /// [Output only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -629,7 +633,7 @@ impl ResponseResult for AutoscalerListResponse {} /// * [get zone operations](struct.ZoneOperationGetCall.html) (response) /// * [patch autoscalers](struct.AutoscalerPatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { /// no description provided pub status: String, @@ -701,7 +705,7 @@ impl ResponseResult for Operation {} /// /// * [list zones](struct.ZoneListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ZoneList { /// no description provided #[serde(rename="nextPageToken")] @@ -1294,43 +1298,39 @@ impl<'a, C, A> ZoneListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn project(mut self, new_value: &str) -> ZoneListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. /// - /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ZoneListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. /// - /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ZoneListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. /// - /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> ZoneListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ZoneListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1360,8 +1360,8 @@ impl<'a, C, A> ZoneListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ComputeReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1562,52 +1562,48 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn project(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn zone(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. /// - /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. /// - /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ZoneOperationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. /// - /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ZoneOperationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1637,8 +1633,8 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ComputeReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1815,40 +1811,39 @@ impl<'a, C, A> ZoneOperationDeleteCall<'a, C, A> where C: BorrowMut ZoneOperationDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn zone(mut self, new_value: &str) -> ZoneOperationDeleteCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// /// Sets the *operation* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn operation(mut self, new_value: &str) -> ZoneOperationDeleteCall<'a, C, A> { self._operation = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ZoneOperationDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1878,8 +1873,8 @@ impl<'a, C, A> ZoneOperationDeleteCall<'a, C, A> where C: BorrowMut ZoneOperationGetCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn project(mut self, new_value: &str) -> ZoneOperationGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn zone(mut self, new_value: &str) -> ZoneOperationGetCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// /// Sets the *operation* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn operation(mut self, new_value: &str) -> ZoneOperationGetCall<'a, C, A> { self._operation = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ZoneOperationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2130,8 +2124,8 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ComputeReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2332,54 +2326,50 @@ impl<'a, C, A> AutoscalerListCall<'a, C, A> where C: BorrowMut, A } + /// Project ID of Autoscaler resource. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Zone name of Autoscaler resource. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerListCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. /// - /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AutoscalerListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. /// - /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AutoscalerListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. /// - /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> AutoscalerListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AutoscalerListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2409,8 +2399,8 @@ impl<'a, C, A> AutoscalerListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ComputeReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2613,52 +2603,51 @@ impl<'a, C, A> AutoscalerUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Autoscaler) -> AutoscalerUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of Autoscaler resource. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerUpdateCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Zone name of Autoscaler resource. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerUpdateCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the Autoscaler resource. + /// /// Sets the *autoscaler* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the Autoscaler resource. pub fn autoscaler(mut self, new_value: &str) -> AutoscalerUpdateCall<'a, C, A> { self._autoscaler = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AutoscalerUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2688,8 +2677,8 @@ impl<'a, C, A> AutoscalerUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Compute`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2892,52 +2881,51 @@ impl<'a, C, A> AutoscalerPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Autoscaler) -> AutoscalerPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of Autoscaler resource. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerPatchCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Zone name of Autoscaler resource. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerPatchCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the Autoscaler resource. + /// /// Sets the *autoscaler* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the Autoscaler resource. pub fn autoscaler(mut self, new_value: &str) -> AutoscalerPatchCall<'a, C, A> { self._autoscaler = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AutoscalerPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2967,8 +2955,8 @@ impl<'a, C, A> AutoscalerPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Compute`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3156,43 +3144,42 @@ impl<'a, C, A> AutoscalerDeleteCall<'a, C, A> where C: BorrowMut, } + /// Project ID of Autoscaler resource. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Zone name of Autoscaler resource. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerDeleteCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the Autoscaler resource. + /// /// Sets the *autoscaler* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the Autoscaler resource. pub fn autoscaler(mut self, new_value: &str) -> AutoscalerDeleteCall<'a, C, A> { self._autoscaler = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AutoscalerDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3222,8 +3209,8 @@ impl<'a, C, A> AutoscalerDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Compute`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3424,42 +3411,41 @@ impl<'a, C, A> AutoscalerInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Autoscaler) -> AutoscalerInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of Autoscaler resource. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerInsertCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Zone name of Autoscaler resource. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerInsertCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AutoscalerInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3489,8 +3475,8 @@ impl<'a, C, A> AutoscalerInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Compute`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3678,43 +3664,42 @@ impl<'a, C, A> AutoscalerGetCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID of Autoscaler resource. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Zone name of Autoscaler resource. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerGetCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the Autoscaler resource. + /// /// Sets the *autoscaler* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the Autoscaler resource. pub fn autoscaler(mut self, new_value: &str) -> AutoscalerGetCall<'a, C, A> { self._autoscaler = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AutoscalerGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3744,8 +3729,8 @@ impl<'a, C, A> AutoscalerGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ComputeReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/bigquery2/README.md b/gen/bigquery2/README.md index 02bfd1ff96..f2f0e28626 100644 --- a/gen/bigquery2/README.md +++ b/gen/bigquery2/README.md @@ -120,16 +120,18 @@ let result = hub.tables().update(&req, "projectId", "datasetId", "tableId") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/bigquery2/src/cmn.rs b/gen/bigquery2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/bigquery2/src/cmn.rs +++ b/gen/bigquery2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/bigquery2/src/lib.rs b/gen/bigquery2/src/lib.rs index 181d97f884..536a06ed57 100644 --- a/gen/bigquery2/src/lib.rs +++ b/gen/bigquery2/src/lib.rs @@ -121,16 +121,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -314,16 +316,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -505,7 +509,7 @@ impl Part for JsonObject {} /// /// * [list projects](struct.ProjectListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProjectList { /// A token to request the next page of results. #[serde(rename="nextPageToken")] @@ -601,7 +605,7 @@ impl ResponseResult for Dataset {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TableDataInsertAllResponseInsertErrors { /// The index of the row that error applies to. pub index: u32, @@ -617,7 +621,7 @@ impl Part for TableDataInsertAllResponseInsertErrors {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TableCell { /// no description provided pub v: String, @@ -647,7 +651,7 @@ impl Part for JobReference {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatasetListDatasets { /// A descriptive name for the dataset, if one exists. #[serde(rename="friendlyName")] @@ -669,7 +673,7 @@ impl Part for DatasetListDatasets {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TableListTables { /// The user-friendly name for this table. #[serde(rename="friendlyName")] @@ -699,7 +703,7 @@ impl Part for TableListTables {} /// /// * [list tables](struct.TableListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TableList { /// A token to request the next page of results. #[serde(rename="nextPageToken")] @@ -722,7 +726,7 @@ impl ResponseResult for TableList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProjectReference { /// [Required] ID of the project. Can be either the numeric ID or the assigned ID of the project. #[serde(rename="projectId")] @@ -741,7 +745,7 @@ impl Part for ProjectReference {} /// /// * [list tabledata](struct.TabledataListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TableDataList { /// A token used for paging results. Providing this token instead of the startIndex parameter can help you retrieve stable results when an underlying table is changing. #[serde(rename="pageToken")] @@ -806,7 +810,7 @@ impl ResponseResult for Job {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobListJobs { /// [Full-projection-only] Describes the state of the job. pub status: JobStatus, @@ -902,7 +906,7 @@ impl Part for JobConfigurationLoad {} /// /// * [list jobs](struct.JobListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobList { /// A token to request the next page of results. #[serde(rename="nextPageToken")] @@ -961,7 +965,7 @@ impl Part for JobConfigurationExtract {} /// /// * [get query results jobs](struct.JobGetQueryResultCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GetQueryResultsResponse { /// The resource type of the response. pub kind: String, @@ -1218,7 +1222,7 @@ impl RequestValue for TableDataInsertAllRequest {} /// /// * [list datasets](struct.DatasetListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatasetList { /// A token that can be used to request the next results page. This property is omitted on the final results page. #[serde(rename="nextPageToken")] @@ -1326,7 +1330,7 @@ impl Part for DatasetReference {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TableRow { /// no description provided pub f: Vec, @@ -1363,7 +1367,7 @@ impl Part for JobConfiguration {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProjectListProjects { /// A descriptive name for this project. #[serde(rename="friendlyName")] @@ -1475,7 +1479,7 @@ impl ResponseResult for Table {} /// /// * [insert all tabledata](struct.TabledataInsertAllCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TableDataInsertAllResponse { /// The resource type of the response. pub kind: String, @@ -1496,7 +1500,7 @@ impl ResponseResult for TableDataInsertAllResponse {} /// /// * [query jobs](struct.JobQueryCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct QueryResponse { /// The resource type. pub kind: String, @@ -2369,52 +2373,51 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Table) -> TableUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of the table to update + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the table to update pub fn project_id(mut self, new_value: &str) -> TableUpdateCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of the table to update + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of the table to update pub fn dataset_id(mut self, new_value: &str) -> TableUpdateCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } + /// Table ID of the table to update + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table ID of the table to update pub fn table_id(mut self, new_value: &str) -> TableUpdateCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2444,8 +2447,8 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2646,42 +2649,41 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Table) -> TableInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of the new table + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the new table pub fn project_id(mut self, new_value: &str) -> TableInsertCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of the new table + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of the new table pub fn dataset_id(mut self, new_value: &str) -> TableInsertCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2711,8 +2713,8 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2908,49 +2910,46 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau } + /// Project ID of the tables to list + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the tables to list pub fn project_id(mut self, new_value: &str) -> TableListCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of the tables to list + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of the tables to list pub fn dataset_id(mut self, new_value: &str) -> TableListCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Page token, returned by a previous call, to request the next page of results + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TableListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TableListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2980,8 +2979,8 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3158,43 +3157,42 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o } + /// Project ID of the table to delete + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the table to delete pub fn project_id(mut self, new_value: &str) -> TableDeleteCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of the table to delete + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of the table to delete pub fn dataset_id(mut self, new_value: &str) -> TableDeleteCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } + /// Table ID of the table to delete + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table ID of the table to delete pub fn table_id(mut self, new_value: &str) -> TableDeleteCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3224,8 +3222,8 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3413,43 +3411,42 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Project ID of the requested table + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the requested table pub fn project_id(mut self, new_value: &str) -> TableGetCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of the requested table + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of the requested table pub fn dataset_id(mut self, new_value: &str) -> TableGetCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } + /// Table ID of the requested table + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table ID of the requested table pub fn table_id(mut self, new_value: &str) -> TableGetCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3479,8 +3476,8 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3683,52 +3680,51 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Table) -> TablePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of the table to update + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the table to update pub fn project_id(mut self, new_value: &str) -> TablePatchCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of the table to update + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of the table to update pub fn dataset_id(mut self, new_value: &str) -> TablePatchCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } + /// Table ID of the table to update + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table ID of the table to update pub fn table_id(mut self, new_value: &str) -> TablePatchCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TablePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3758,8 +3754,8 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3960,42 +3956,41 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Dataset) -> DatasetPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of the dataset being updated + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the dataset being updated pub fn project_id(mut self, new_value: &str) -> DatasetPatchCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of the dataset being updated + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of the dataset being updated pub fn dataset_id(mut self, new_value: &str) -> DatasetPatchCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4025,8 +4020,8 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4212,33 +4207,32 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// Project ID of the requested dataset + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the requested dataset pub fn project_id(mut self, new_value: &str) -> DatasetGetCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of the requested dataset + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of the requested dataset pub fn dataset_id(mut self, new_value: &str) -> DatasetGetCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4268,8 +4262,8 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4468,47 +4462,43 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o } + /// Project ID of the datasets to be listed + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the datasets to be listed pub fn project_id(mut self, new_value: &str) -> DatasetListCall<'a, C, A> { self._project_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Page token, returned by a previous call, to request the next page of results + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DatasetListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of results to return + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> DatasetListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *all* query property to the given value. - /// - /// /// Whether to list all datasets, including hidden ones + /// + /// Sets the *all* query property to the given value. pub fn all(mut self, new_value: bool) -> DatasetListCall<'a, C, A> { self._all = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4538,8 +4528,8 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4740,42 +4730,41 @@ impl<'a, C, A> DatasetUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Dataset) -> DatasetUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of the dataset being updated + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the dataset being updated pub fn project_id(mut self, new_value: &str) -> DatasetUpdateCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of the dataset being updated + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of the dataset being updated pub fn dataset_id(mut self, new_value: &str) -> DatasetUpdateCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4805,8 +4794,8 @@ impl<'a, C, A> DatasetUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4986,41 +4975,39 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID of the dataset being deleted + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the dataset being deleted pub fn project_id(mut self, new_value: &str) -> DatasetDeleteCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of dataset being deleted + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of dataset being deleted pub fn dataset_id(mut self, new_value: &str) -> DatasetDeleteCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delete contents* query property to the given value. - /// - /// /// If True, delete all the tables in the dataset. If False and the dataset contains tables, the request will fail. Default is False + /// + /// Sets the *delete contents* query property to the given value. pub fn delete_contents(mut self, new_value: bool) -> DatasetDeleteCall<'a, C, A> { self._delete_contents = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5050,8 +5037,8 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5250,32 +5237,31 @@ impl<'a, C, A> DatasetInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Dataset) -> DatasetInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of the new dataset + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the new dataset pub fn project_id(mut self, new_value: &str) -> DatasetInsertCall<'a, C, A> { self._project_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5305,8 +5291,8 @@ impl<'a, C, A> DatasetInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5505,32 +5491,31 @@ impl<'a, C, A> JobQueryCall<'a, C, A> where C: BorrowMut, A: oaut } + /// /// Sets the *request* property to the given value. /// /// 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: &QueryRequest) -> JobQueryCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of the project billed for the query + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the project billed for the query pub fn project_id(mut self, new_value: &str) -> JobQueryCall<'a, C, A> { self._project_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobQueryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5560,8 +5545,8 @@ impl<'a, C, A> JobQueryCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5767,65 +5752,60 @@ impl<'a, C, A> JobGetQueryResultCall<'a, C, A> where C: BorrowMut } + /// Project ID of the query job + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the query job pub fn project_id(mut self, new_value: &str) -> JobGetQueryResultCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Job ID of the query job + /// /// Sets the *job id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Job ID of the query job pub fn job_id(mut self, new_value: &str) -> JobGetQueryResultCall<'a, C, A> { self._job_id = new_value.to_string(); self } - /// Sets the *timeout ms* query property to the given value. - /// - /// /// How long to wait for the query to complete, in milliseconds, before returning. Default is to return immediately. If the timeout passes before the job completes, the request will fail with a TIMEOUT error + /// + /// Sets the *timeout ms* query property to the given value. pub fn timeout_ms(mut self, new_value: u32) -> JobGetQueryResultCall<'a, C, A> { self._timeout_ms = Some(new_value); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Zero-based index of the starting row + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: &str) -> JobGetQueryResultCall<'a, C, A> { self._start_index = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Page token, returned by a previous call, to request the next page of results + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> JobGetQueryResultCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to read + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> JobGetQueryResultCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobGetQueryResultCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5855,8 +5835,8 @@ impl<'a, C, A> JobGetQueryResultCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6069,64 +6049,58 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth } + /// Project ID of the jobs to list + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the jobs to list pub fn project_id(mut self, new_value: &str) -> JobListCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Filter for job state + /// /// Append the given value to the *state filter* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Filter for job state pub fn add_state_filter(mut self, new_value: &str) -> JobListCall<'a, C, A> { self._state_filter.push(new_value.to_string()); self } - /// Sets the *projection* query property to the given value. - /// - /// /// Restrict information returned to a set of selected fields + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> JobListCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Page token, returned by a previous call, to request the next page of results + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> JobListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> JobListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *all users* query property to the given value. - /// - /// /// Whether to display jobs owned by all users in the project. Default false + /// + /// Sets the *all users* query property to the given value. pub fn all_users(mut self, new_value: bool) -> JobListCall<'a, C, A> { self._all_users = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6156,8 +6130,8 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6343,33 +6317,32 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } + /// Project ID of the requested job + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the requested job pub fn project_id(mut self, new_value: &str) -> JobGetCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Job ID of the requested job + /// /// Sets the *job id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Job ID of the requested job pub fn job_id(mut self, new_value: &str) -> JobGetCall<'a, C, A> { self._job_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6399,8 +6372,8 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6710,32 +6683,31 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau self.doit(resumeable_stream, mime_type, "resumable") } + /// /// Sets the *request* property to the given value. /// /// 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) -> JobInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of the project that will be billed for the job + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the project that will be billed for the job pub fn project_id(mut self, new_value: &str) -> JobInsertCall<'a, C, A> { self._project_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6765,8 +6737,8 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6969,52 +6941,51 @@ impl<'a, C, A> TabledataInsertAllCall<'a, C, A> where C: BorrowMut TabledataInsertAllCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID of the destination table. + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the destination table. pub fn project_id(mut self, new_value: &str) -> TabledataInsertAllCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of the destination table. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of the destination table. pub fn dataset_id(mut self, new_value: &str) -> TabledataInsertAllCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } + /// Table ID of the destination table. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table ID of the destination table. pub fn table_id(mut self, new_value: &str) -> TabledataInsertAllCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TabledataInsertAllCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7044,8 +7015,8 @@ impl<'a, C, A> TabledataInsertAllCall<'a, C, A> where C: BorrowMut TabledataListCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID of the table to read + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID of the table to read pub fn project_id(mut self, new_value: &str) -> TabledataListCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// Dataset ID of the table to read + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset ID of the table to read pub fn dataset_id(mut self, new_value: &str) -> TabledataListCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } + /// Table ID of the table to read + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table ID of the table to read pub fn table_id(mut self, new_value: &str) -> TabledataListCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Zero-based index of the starting row to read + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: &str) -> TabledataListCall<'a, C, A> { self._start_index = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Page token, returned by a previous call, identifying the result set + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TabledataListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TabledataListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TabledataListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7338,8 +7305,8 @@ impl<'a, C, A> TabledataListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7507,29 +7474,26 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } - /// Sets the *page token* query property to the given value. - /// - /// /// Page token, returned by a previous call, to request the next page of results + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ProjectListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ProjectListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7559,8 +7523,8 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/blogger3/README.md b/gen/blogger3/README.md index af788a2f78..2ef4731e71 100644 --- a/gen/blogger3/README.md +++ b/gen/blogger3/README.md @@ -130,16 +130,18 @@ let result = hub.posts().list("blogId") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/blogger3/src/cmn.rs b/gen/blogger3/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/blogger3/src/cmn.rs +++ b/gen/blogger3/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/blogger3/src/lib.rs b/gen/blogger3/src/lib.rs index 3f5289ca48..681117251d 100644 --- a/gen/blogger3/src/lib.rs +++ b/gen/blogger3/src/lib.rs @@ -131,16 +131,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -312,16 +314,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -402,7 +406,7 @@ impl Part for PostBlog {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BlogPerUserInfo { /// True if the user has Admin level access to the blog. #[serde(rename="hasAdminAccess")] @@ -429,7 +433,7 @@ impl Part for BlogPerUserInfo {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostPerUserInfo { /// The kind of this entity. Always blogger#postPerUserInfo pub kind: String, @@ -461,7 +465,7 @@ impl Part for PostPerUserInfo {} /// * [get blogs](struct.BlogGetCall.html) (response) /// * [get by url blogs](struct.BlogGetByUrlCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Blog { /// The status of the blog. pub status: String, @@ -506,7 +510,7 @@ impl ResponseResult for Blog {} /// /// * [list post user infos](struct.PostUserInfoListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostUserInfosList { /// Pagination token to fetch the next page, if one exists. #[serde(rename="nextPageToken")] @@ -529,7 +533,7 @@ impl ResponseResult for PostUserInfosList {} /// /// * [get blog user infos](struct.BlogUserInfoGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BlogUserInfo { /// The Blog resource. pub blog: Blog, @@ -610,7 +614,7 @@ impl Part for CommentPost {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserBlogs { /// The URL of the Blogs for this user. #[serde(rename="selfLink")] @@ -645,7 +649,7 @@ impl Part for PostReplies {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PageviewsCounts { /// Count of page views for the given time range pub count: String, @@ -667,7 +671,7 @@ impl Part for PageviewsCounts {} /// /// * [list by user blogs](struct.BlogListByUserCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BlogList { /// The list of Blogs this user has Authorship or Admin rights over. pub items: Vec, @@ -690,7 +694,7 @@ impl ResponseResult for BlogList {} /// /// * [get users](struct.UserGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct User { /// Profile summary information. pub about: String, @@ -852,7 +856,7 @@ impl Part for PostAuthor {} /// * [list by blog comments](struct.CommentListByBlogCall.html) (response) /// * [list comments](struct.CommentListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentList { /// Pagination token to fetch the next page, if one exists. #[serde(rename="nextPageToken")] @@ -893,7 +897,7 @@ impl Part for PostImages {} /// * [list posts](struct.PostListCall.html) (response) /// * [search posts](struct.PostSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostList { /// Pagination token to fetch the next page, if one exists. #[serde(rename="nextPageToken")] @@ -925,7 +929,7 @@ impl Part for CommentAuthorImage {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BlogPages { /// The count of pages in this blog. #[serde(rename="totalItems")] @@ -943,7 +947,7 @@ impl Part for BlogPages {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BlogPosts { /// The count of posts in this blog. #[serde(rename="totalItems")] @@ -1066,7 +1070,7 @@ impl ResponseResult for Comment {} /// * [list post user infos](struct.PostUserInfoListCall.html) (none) /// * [get post user infos](struct.PostUserInfoGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostUserInfo { /// The kind of this entity. Always blogger#postUserInfo pub kind: String, @@ -1089,7 +1093,7 @@ impl ResponseResult for PostUserInfo {} /// /// * [get page views](struct.PageViewGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Pageviews { /// The container of posts in this blog. pub counts: Vec, @@ -1133,7 +1137,7 @@ impl Part for PageAuthor {} /// /// * [list pages](struct.PageListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PageList { /// Pagination token to fetch the next page, if one exists. #[serde(rename="nextPageToken")] @@ -1151,7 +1155,7 @@ impl ResponseResult for PageList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserLocale { /// The user's country setting. pub country: String, @@ -1197,7 +1201,7 @@ impl Part for PageBlog {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BlogLocale { /// The country this blog's locale is set to. pub country: String, @@ -2338,7 +2342,7 @@ impl<'a, C, A> PageViewGetCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/pageviews".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{blogId}", "blogId")].iter() { @@ -2434,31 +2438,29 @@ impl<'a, C, A> PageViewGetCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the blog to get. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the blog to get. pub fn blog_id(mut self, new_value: &str) -> PageViewGetCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// /// Append the given value to the *range* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// pub fn add_range(mut self, new_value: &str) -> PageViewGetCall<'a, C, A> { self._range.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PageViewGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2488,8 +2490,8 @@ impl<'a, C, A> PageViewGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2673,23 +2675,22 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// The ID of the user to get. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the user to get. pub fn user_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2719,8 +2720,8 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2932,57 +2933,52 @@ impl<'a, C, A> BlogListByUserCall<'a, C, A> where C: BorrowMut, A } + /// ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. pub fn user_id(mut self, new_value: &str) -> BlogListByUserCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *view* query property to the given value. - /// - /// /// Access level with which to view the blogs. Note that some fields require elevated access. + /// + /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> BlogListByUserCall<'a, C, A> { self._view = Some(new_value.to_string()); self } + /// Blog statuses to include in the result (default: Live blogs only). Note that ADMIN access is required to view deleted blogs. + /// /// Append the given value to the *status* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Blog statuses to include in the result (default: Live blogs only). Note that ADMIN access is required to view deleted blogs. pub fn add_status(mut self, new_value: &str) -> BlogListByUserCall<'a, C, A> { self._status.push(new_value.to_string()); self } + /// User access types for blogs to include in the results, e.g. AUTHOR will return blogs where the user has author level access. If no roles are specified, defaults to ADMIN and AUTHOR roles. + /// /// Append the given value to the *role* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// User access types for blogs to include in the results, e.g. AUTHOR will return blogs where the user has author level access. If no roles are specified, defaults to ADMIN and AUTHOR roles. pub fn add_role(mut self, new_value: &str) -> BlogListByUserCall<'a, C, A> { self._role.push(new_value.to_string()); self } - /// Sets the *fetch user info* query property to the given value. - /// - /// /// Whether the response is a list of blogs with per-user information instead of just blogs. + /// + /// Sets the *fetch user info* query property to the given value. pub fn fetch_user_info(mut self, new_value: bool) -> BlogListByUserCall<'a, C, A> { self._fetch_user_info = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BlogListByUserCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3012,8 +3008,8 @@ impl<'a, C, A> BlogListByUserCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3207,39 +3203,36 @@ impl<'a, C, A> BlogGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// The ID of the blog to get. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the blog to get. pub fn blog_id(mut self, new_value: &str) -> BlogGetCall<'a, C, A> { self._blog_id = new_value.to_string(); self } - /// Sets the *view* query property to the given value. - /// - /// /// Access level with which to view the blog. Note that some fields require elevated access. + /// + /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> BlogGetCall<'a, C, A> { self._view = Some(new_value.to_string()); self } - /// Sets the *max posts* query property to the given value. - /// - /// /// Maximum number of posts to pull back with the blog. + /// + /// Sets the *max posts* query property to the given value. pub fn max_posts(mut self, new_value: u32) -> BlogGetCall<'a, C, A> { self._max_posts = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BlogGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3269,8 +3262,8 @@ impl<'a, C, A> BlogGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3435,31 +3428,29 @@ impl<'a, C, A> BlogGetByUrlCall<'a, C, A> where C: BorrowMut, A: } + /// The URL of the blog to retrieve. + /// /// Sets the *url* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The URL of the blog to retrieve. pub fn url(mut self, new_value: &str) -> BlogGetByUrlCall<'a, C, A> { self._url = new_value.to_string(); self } - /// Sets the *view* query property to the given value. - /// - /// /// Access level with which to view the blog. Note that some fields require elevated access. + /// + /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> BlogGetByUrlCall<'a, C, A> { self._view = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BlogGetByUrlCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3489,8 +3480,8 @@ impl<'a, C, A> BlogGetByUrlCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3716,82 +3707,76 @@ impl<'a, C, A> PostUpdateCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Post) -> PostUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the Blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PostUpdateCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Post. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> PostUpdateCall<'a, C, A> { self._post_id = new_value.to_string(); self } - /// Sets the *revert* query property to the given value. - /// - /// /// Whether a revert action should be performed when the post is updated (default: false). + /// + /// Sets the *revert* query property to the given value. pub fn revert(mut self, new_value: bool) -> PostUpdateCall<'a, C, A> { self._revert = Some(new_value); self } - /// Sets the *publish* query property to the given value. - /// - /// /// Whether a publish action should be performed when the post is updated (default: false). + /// + /// Sets the *publish* query property to the given value. pub fn publish(mut self, new_value: bool) -> PostUpdateCall<'a, C, A> { self._publish = Some(new_value); self } - /// Sets the *max comments* query property to the given value. - /// - /// /// Maximum number of comments to retrieve with the returned post. + /// + /// Sets the *max comments* query property to the given value. pub fn max_comments(mut self, new_value: u32) -> PostUpdateCall<'a, C, A> { self._max_comments = Some(new_value); self } - /// Sets the *fetch images* query property to the given value. - /// - /// /// Whether image URL metadata for each post is included in the returned result (default: false). + /// + /// Sets the *fetch images* query property to the given value. pub fn fetch_images(mut self, new_value: bool) -> PostUpdateCall<'a, C, A> { self._fetch_images = Some(new_value); self } - /// Sets the *fetch body* query property to the given value. - /// - /// /// Whether the body content of the post is included with the result (default: true). + /// + /// Sets the *fetch body* query property to the given value. pub fn fetch_body(mut self, new_value: bool) -> PostUpdateCall<'a, C, A> { self._fetch_body = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3821,8 +3806,8 @@ impl<'a, C, A> PostUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4018,49 +4003,46 @@ impl<'a, C, A> PostGetByPathCall<'a, C, A> where C: BorrowMut, A: } + /// ID of the blog to fetch the post from. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog to fetch the post from. pub fn blog_id(mut self, new_value: &str) -> PostGetByPathCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// Path of the Post to retrieve. + /// /// Sets the *path* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Path of the Post to retrieve. pub fn path(mut self, new_value: &str) -> PostGetByPathCall<'a, C, A> { self._path = new_value.to_string(); self } - /// Sets the *view* query property to the given value. - /// - /// /// Access level with which to view the returned result. Note that some fields require elevated access. + /// + /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> PostGetByPathCall<'a, C, A> { self._view = Some(new_value.to_string()); self } - /// Sets the *max comments* query property to the given value. - /// - /// /// Maximum number of comments to pull back on a post. + /// + /// Sets the *max comments* query property to the given value. pub fn max_comments(mut self, new_value: u32) -> PostGetByPathCall<'a, C, A> { self._max_comments = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostGetByPathCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4090,8 +4072,8 @@ impl<'a, C, A> PostGetByPathCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4297,65 +4279,60 @@ impl<'a, C, A> PostGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// ID of the blog to fetch the post from. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog to fetch the post from. pub fn blog_id(mut self, new_value: &str) -> PostGetCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the post + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the post pub fn post_id(mut self, new_value: &str) -> PostGetCall<'a, C, A> { self._post_id = new_value.to_string(); self } - /// Sets the *view* query property to the given value. - /// - /// /// Access level with which to view the returned result. Note that some fields require elevated access. + /// + /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> PostGetCall<'a, C, A> { self._view = Some(new_value.to_string()); self } - /// Sets the *max comments* query property to the given value. - /// - /// /// Maximum number of comments to pull back on a post. + /// + /// Sets the *max comments* query property to the given value. pub fn max_comments(mut self, new_value: u32) -> PostGetCall<'a, C, A> { self._max_comments = Some(new_value); self } - /// Sets the *fetch images* query property to the given value. - /// - /// /// Whether image URL metadata for each post is included (default: false). + /// + /// Sets the *fetch images* query property to the given value. pub fn fetch_images(mut self, new_value: bool) -> PostGetCall<'a, C, A> { self._fetch_images = Some(new_value); self } - /// Sets the *fetch body* query property to the given value. - /// - /// /// Whether the body content of the post is included (default: true). This should be set to false when the post bodies are not required, to help minimize traffic. + /// + /// Sets the *fetch body* query property to the given value. pub fn fetch_body(mut self, new_value: bool) -> PostGetCall<'a, C, A> { self._fetch_body = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4385,8 +4362,8 @@ impl<'a, C, A> PostGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4600,56 +4577,52 @@ impl<'a, C, A> PostInsertCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Post) -> PostInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// ID of the blog to add the post to. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog to add the post to. pub fn blog_id(mut self, new_value: &str) -> PostInsertCall<'a, C, A> { self._blog_id = new_value.to_string(); self } - /// Sets the *is draft* query property to the given value. - /// - /// /// Whether to create the post as a draft (default: false). + /// + /// Sets the *is draft* query property to the given value. pub fn is_draft(mut self, new_value: bool) -> PostInsertCall<'a, C, A> { self._is_draft = Some(new_value); self } - /// Sets the *fetch images* query property to the given value. - /// - /// /// Whether image URL metadata for each post is included in the returned result (default: false). + /// + /// Sets the *fetch images* query property to the given value. pub fn fetch_images(mut self, new_value: bool) -> PostInsertCall<'a, C, A> { self._fetch_images = Some(new_value); self } - /// Sets the *fetch body* query property to the given value. - /// - /// /// Whether the body content of the post is included with the result (default: true). + /// + /// Sets the *fetch body* query property to the given value. pub fn fetch_body(mut self, new_value: bool) -> PostInsertCall<'a, C, A> { self._fetch_body = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4679,8 +4652,8 @@ impl<'a, C, A> PostInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4871,41 +4844,39 @@ impl<'a, C, A> PostPublishCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the Blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PostPublishCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Post. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> PostPublishCall<'a, C, A> { self._post_id = new_value.to_string(); self } - /// Sets the *publish date* query property to the given value. - /// - /// /// Optional date and time to schedule the publishing of the Blog. If no publishDate parameter is given, the post is either published at the a previously saved schedule date (if present), or the current time. If a future date is given, the post will be scheduled to be published. + /// + /// Sets the *publish date* query property to the given value. pub fn publish_date(mut self, new_value: &str) -> PostPublishCall<'a, C, A> { self._publish_date = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostPublishCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4935,8 +4906,8 @@ impl<'a, C, A> PostPublishCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5111,33 +5082,32 @@ impl<'a, C, A> PostDeleteCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the Blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PostDeleteCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Post. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> PostDeleteCall<'a, C, A> { self._post_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5167,8 +5137,8 @@ impl<'a, C, A> PostDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5354,33 +5324,32 @@ impl<'a, C, A> PostRevertCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the Blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PostRevertCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Post. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> PostRevertCall<'a, C, A> { self._post_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostRevertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5410,8 +5379,8 @@ impl<'a, C, A> PostRevertCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5607,49 +5576,46 @@ impl<'a, C, A> PostSearchCall<'a, C, A> where C: BorrowMut, A: oa } + /// ID of the blog to fetch the post from. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog to fetch the post from. pub fn blog_id(mut self, new_value: &str) -> PostSearchCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// Query terms to search this blog for matching posts. + /// /// Sets the *q* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Query terms to search this blog for matching posts. pub fn q(mut self, new_value: &str) -> PostSearchCall<'a, C, A> { self._q = new_value.to_string(); self } - /// Sets the *order by* query property to the given value. - /// - /// /// Sort search results + /// + /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> PostSearchCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// Sets the *fetch bodies* query property to the given value. - /// - /// /// Whether the body content of posts is included (default: true). This should be set to false when the post bodies are not required, to help minimize traffic. + /// + /// Sets the *fetch bodies* query property to the given value. pub fn fetch_bodies(mut self, new_value: bool) -> PostSearchCall<'a, C, A> { self._fetch_bodies = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5679,8 +5645,8 @@ impl<'a, C, A> PostSearchCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5906,82 +5872,76 @@ impl<'a, C, A> PostPatchCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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: &Post) -> PostPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the Blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PostPatchCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Post. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> PostPatchCall<'a, C, A> { self._post_id = new_value.to_string(); self } - /// Sets the *revert* query property to the given value. - /// - /// /// Whether a revert action should be performed when the post is updated (default: false). + /// + /// Sets the *revert* query property to the given value. pub fn revert(mut self, new_value: bool) -> PostPatchCall<'a, C, A> { self._revert = Some(new_value); self } - /// Sets the *publish* query property to the given value. - /// - /// /// Whether a publish action should be performed when the post is updated (default: false). + /// + /// Sets the *publish* query property to the given value. pub fn publish(mut self, new_value: bool) -> PostPatchCall<'a, C, A> { self._publish = Some(new_value); self } - /// Sets the *max comments* query property to the given value. - /// - /// /// Maximum number of comments to retrieve with the returned post. + /// + /// Sets the *max comments* query property to the given value. pub fn max_comments(mut self, new_value: u32) -> PostPatchCall<'a, C, A> { self._max_comments = Some(new_value); self } - /// Sets the *fetch images* query property to the given value. - /// - /// /// Whether image URL metadata for each post is included in the returned result (default: false). + /// + /// Sets the *fetch images* query property to the given value. pub fn fetch_images(mut self, new_value: bool) -> PostPatchCall<'a, C, A> { self._fetch_images = Some(new_value); self } - /// Sets the *fetch body* query property to the given value. - /// - /// /// Whether the body content of the post is included with the result (default: true). + /// + /// Sets the *fetch body* query property to the given value. pub fn fetch_body(mut self, new_value: bool) -> PostPatchCall<'a, C, A> { self._fetch_body = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6011,8 +5971,8 @@ impl<'a, C, A> PostPatchCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6250,104 +6210,93 @@ impl<'a, C, A> PostListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// ID of the blog to fetch posts from. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog to fetch posts from. pub fn blog_id(mut self, new_value: &str) -> PostListCall<'a, C, A> { self._blog_id = new_value.to_string(); self } - /// Sets the *view* query property to the given value. - /// - /// /// Access level with which to view the returned result. Note that some fields require escalated access. + /// + /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> PostListCall<'a, C, A> { self._view = Some(new_value.to_string()); self } + /// Statuses to include in the results. + /// /// Append the given value to the *status* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Statuses to include in the results. pub fn add_status(mut self, new_value: &str) -> PostListCall<'a, C, A> { self._status.push(new_value.to_string()); self } - /// Sets the *start date* query property to the given value. - /// - /// /// Earliest post date to fetch, a date-time with RFC 3339 formatting. + /// + /// Sets the *start date* query property to the given value. pub fn start_date(mut self, new_value: &str) -> PostListCall<'a, C, A> { self._start_date = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token if the request is paged. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> PostListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *order by* query property to the given value. - /// - /// /// Sort search results + /// + /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> PostListCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of posts to fetch. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> PostListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *labels* query property to the given value. - /// - /// /// Comma-separated list of labels to search for. + /// + /// Sets the *labels* query property to the given value. pub fn labels(mut self, new_value: &str) -> PostListCall<'a, C, A> { self._labels = Some(new_value.to_string()); self } - /// Sets the *fetch images* query property to the given value. - /// - /// /// Whether image URL metadata for each post is included. + /// + /// Sets the *fetch images* query property to the given value. pub fn fetch_images(mut self, new_value: bool) -> PostListCall<'a, C, A> { self._fetch_images = Some(new_value); self } - /// Sets the *fetch bodies* query property to the given value. - /// - /// /// Whether the body content of posts is included (default: true). This should be set to false when the post bodies are not required, to help minimize traffic. + /// + /// Sets the *fetch bodies* query property to the given value. pub fn fetch_bodies(mut self, new_value: bool) -> PostListCall<'a, C, A> { self._fetch_bodies = Some(new_value); self } - /// Sets the *end date* query property to the given value. - /// - /// /// Latest post date to fetch, a date-time with RFC 3339 formatting. + /// + /// Sets the *end date* query property to the given value. pub fn end_date(mut self, new_value: &str) -> PostListCall<'a, C, A> { self._end_date = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6377,8 +6326,8 @@ impl<'a, C, A> PostListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6571,51 +6520,49 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// ID of the blog to containing the comment. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog to containing the comment. pub fn blog_id(mut self, new_value: &str) -> CommentGetCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// ID of the post to fetch posts from. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the post to fetch posts from. pub fn post_id(mut self, new_value: &str) -> CommentGetCall<'a, C, A> { self._post_id = new_value.to_string(); self } + /// The ID of the comment to get. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment to get. pub fn comment_id(mut self, new_value: &str) -> CommentGetCall<'a, C, A> { self._comment_id = new_value.to_string(); self } - /// Sets the *view* query property to the given value. - /// - /// /// Access level for the requested comment (default: READER). Note that some comments will require elevated permissions, for example comments where the parent posts which is in a draft state, or comments that are pending moderation. + /// + /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> CommentGetCall<'a, C, A> { self._view = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6645,8 +6592,8 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6834,43 +6781,42 @@ impl<'a, C, A> CommentRemoveContentCall<'a, C, A> where C: BorrowMut CommentRemoveContentCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Post. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> CommentRemoveContentCall<'a, C, A> { self._post_id = new_value.to_string(); self } + /// The ID of the comment to delete content from. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment to delete content from. pub fn comment_id(mut self, new_value: &str) -> CommentRemoveContentCall<'a, C, A> { self._comment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentRemoveContentCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6900,8 +6846,8 @@ impl<'a, C, A> CommentRemoveContentCall<'a, C, A> where C: BorrowMut CommentListByBlogCall<'a, C, A> where C: BorrowMut } + /// ID of the blog to fetch comments from. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog to fetch comments from. pub fn blog_id(mut self, new_value: &str) -> CommentListByBlogCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// /// Append the given value to the *status* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// pub fn add_status(mut self, new_value: &str) -> CommentListByBlogCall<'a, C, A> { self._status.push(new_value.to_string()); self } - /// Sets the *start date* query property to the given value. - /// - /// /// Earliest date of comment to fetch, a date-time with RFC 3339 formatting. + /// + /// Sets the *start date* query property to the given value. pub fn start_date(mut self, new_value: &str) -> CommentListByBlogCall<'a, C, A> { self._start_date = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token if request is paged. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CommentListByBlogCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of comments to include in the result. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> CommentListByBlogCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *fetch bodies* query property to the given value. - /// - /// /// Whether the body content of the comments is included. + /// + /// Sets the *fetch bodies* query property to the given value. pub fn fetch_bodies(mut self, new_value: bool) -> CommentListByBlogCall<'a, C, A> { self._fetch_bodies = Some(new_value); self } - /// Sets the *end date* query property to the given value. - /// - /// /// Latest date of comment to fetch, a date-time with RFC 3339 formatting. + /// + /// Sets the *end date* query property to the given value. pub fn end_date(mut self, new_value: &str) -> CommentListByBlogCall<'a, C, A> { self._end_date = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentListByBlogCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7213,8 +7152,8 @@ impl<'a, C, A> CommentListByBlogCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7402,43 +7341,42 @@ impl<'a, C, A> CommentMarkAsSpamCall<'a, C, A> where C: BorrowMut } + /// The ID of the Blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> CommentMarkAsSpamCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Post. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> CommentMarkAsSpamCall<'a, C, A> { self._post_id = new_value.to_string(); self } + /// The ID of the comment to mark as spam. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment to mark as spam. pub fn comment_id(mut self, new_value: &str) -> CommentMarkAsSpamCall<'a, C, A> { self._comment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentMarkAsSpamCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7468,8 +7406,8 @@ impl<'a, C, A> CommentMarkAsSpamCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7694,89 +7632,81 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o } + /// ID of the blog to fetch comments from. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog to fetch comments from. pub fn blog_id(mut self, new_value: &str) -> CommentListCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// ID of the post to fetch posts from. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the post to fetch posts from. pub fn post_id(mut self, new_value: &str) -> CommentListCall<'a, C, A> { self._post_id = new_value.to_string(); self } - /// Sets the *view* query property to the given value. - /// - /// /// Access level with which to view the returned result. Note that some fields require elevated access. + /// + /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> CommentListCall<'a, C, A> { self._view = Some(new_value.to_string()); self } + /// /// Append the given value to the *status* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// pub fn add_status(mut self, new_value: &str) -> CommentListCall<'a, C, A> { self._status.push(new_value.to_string()); self } - /// Sets the *start date* query property to the given value. - /// - /// /// Earliest date of comment to fetch, a date-time with RFC 3339 formatting. + /// + /// Sets the *start date* query property to the given value. pub fn start_date(mut self, new_value: &str) -> CommentListCall<'a, C, A> { self._start_date = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token if request is paged. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CommentListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of comments to include in the result. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> CommentListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *fetch bodies* query property to the given value. - /// - /// /// Whether the body content of the comments is included. + /// + /// Sets the *fetch bodies* query property to the given value. pub fn fetch_bodies(mut self, new_value: bool) -> CommentListCall<'a, C, A> { self._fetch_bodies = Some(new_value); self } - /// Sets the *end date* query property to the given value. - /// - /// /// Latest date of comment to fetch, a date-time with RFC 3339 formatting. + /// + /// Sets the *end date* query property to the given value. pub fn end_date(mut self, new_value: &str) -> CommentListCall<'a, C, A> { self._end_date = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7806,8 +7736,8 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7995,43 +7925,42 @@ impl<'a, C, A> CommentApproveCall<'a, C, A> where C: BorrowMut, A } + /// The ID of the Blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> CommentApproveCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Post. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> CommentApproveCall<'a, C, A> { self._post_id = new_value.to_string(); self } + /// The ID of the comment to mark as not spam. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment to mark as not spam. pub fn comment_id(mut self, new_value: &str) -> CommentApproveCall<'a, C, A> { self._comment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentApproveCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8061,8 +7990,8 @@ impl<'a, C, A> CommentApproveCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8239,43 +8168,42 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the Blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> CommentDeleteCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Post. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> CommentDeleteCall<'a, C, A> { self._post_id = new_value.to_string(); self } + /// The ID of the comment to delete. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment to delete. pub fn comment_id(mut self, new_value: &str) -> CommentDeleteCall<'a, C, A> { self._comment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8305,8 +8233,8 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8499,51 +8427,49 @@ impl<'a, C, A> PostUserInfoGetCall<'a, C, A> where C: BorrowMut, } + /// ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. pub fn user_id(mut self, new_value: &str) -> PostUserInfoGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the blog. pub fn blog_id(mut self, new_value: &str) -> PostUserInfoGetCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the post to get. + /// /// Sets the *post id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the post to get. pub fn post_id(mut self, new_value: &str) -> PostUserInfoGetCall<'a, C, A> { self._post_id = new_value.to_string(); self } - /// Sets the *max comments* query property to the given value. - /// - /// /// Maximum number of comments to pull back on a post. + /// + /// Sets the *max comments* query property to the given value. pub fn max_comments(mut self, new_value: u32) -> PostUserInfoGetCall<'a, C, A> { self._max_comments = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostUserInfoGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8573,8 +8499,8 @@ impl<'a, C, A> PostUserInfoGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8809,105 +8735,95 @@ impl<'a, C, A> PostUserInfoListCall<'a, C, A> where C: BorrowMut, } + /// ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. pub fn user_id(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// ID of the blog to fetch posts from. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog to fetch posts from. pub fn blog_id(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, A> { self._blog_id = new_value.to_string(); self } - /// Sets the *view* query property to the given value. - /// - /// /// Access level with which to view the returned result. Note that some fields require elevated access. + /// + /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, A> { self._view = Some(new_value.to_string()); self } + /// /// Append the given value to the *status* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// pub fn add_status(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, A> { self._status.push(new_value.to_string()); self } - /// Sets the *start date* query property to the given value. - /// - /// /// Earliest post date to fetch, a date-time with RFC 3339 formatting. + /// + /// Sets the *start date* query property to the given value. pub fn start_date(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, A> { self._start_date = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token if the request is paged. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *order by* query property to the given value. - /// - /// /// Sort order applied to search results. Default is published. + /// + /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of posts to fetch. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> PostUserInfoListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *labels* query property to the given value. - /// - /// /// Comma-separated list of labels to search for. + /// + /// Sets the *labels* query property to the given value. pub fn labels(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, A> { self._labels = Some(new_value.to_string()); self } - /// Sets the *fetch bodies* query property to the given value. - /// - /// /// Whether the body content of posts is included. Default is false. + /// + /// Sets the *fetch bodies* query property to the given value. pub fn fetch_bodies(mut self, new_value: bool) -> PostUserInfoListCall<'a, C, A> { self._fetch_bodies = Some(new_value); self } - /// Sets the *end date* query property to the given value. - /// - /// /// Latest post date to fetch, a date-time with RFC 3339 formatting. + /// + /// Sets the *end date* query property to the given value. pub fn end_date(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, A> { self._end_date = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostUserInfoListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8937,8 +8853,8 @@ impl<'a, C, A> PostUserInfoListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9129,41 +9045,39 @@ impl<'a, C, A> BlogUserInfoGetCall<'a, C, A> where C: BorrowMut, } + /// ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. pub fn user_id(mut self, new_value: &str) -> BlogUserInfoGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the blog to get. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the blog to get. pub fn blog_id(mut self, new_value: &str) -> BlogUserInfoGetCall<'a, C, A> { self._blog_id = new_value.to_string(); self } - /// Sets the *max posts* query property to the given value. - /// - /// /// Maximum number of posts to pull back with the blog. + /// + /// Sets the *max posts* query property to the given value. pub fn max_posts(mut self, new_value: u32) -> BlogUserInfoGetCall<'a, C, A> { self._max_posts = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BlogUserInfoGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9193,8 +9107,8 @@ impl<'a, C, A> BlogUserInfoGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9385,40 +9299,38 @@ impl<'a, C, A> PageGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// ID of the blog containing the page. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog containing the page. pub fn blog_id(mut self, new_value: &str) -> PageGetCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the page to get. + /// /// Sets the *page id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the page to get. pub fn page_id(mut self, new_value: &str) -> PageGetCall<'a, C, A> { self._page_id = new_value.to_string(); self } - /// Sets the *view* query property to the given value. /// - /// + /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> PageGetCall<'a, C, A> { self._view = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PageGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9448,8 +9360,8 @@ impl<'a, C, A> PageGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9662,63 +9574,57 @@ impl<'a, C, A> PageListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// ID of the blog to fetch Pages from. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog to fetch Pages from. pub fn blog_id(mut self, new_value: &str) -> PageListCall<'a, C, A> { self._blog_id = new_value.to_string(); self } - /// Sets the *view* query property to the given value. - /// - /// /// Access level with which to view the returned result. Note that some fields require elevated access. + /// + /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> PageListCall<'a, C, A> { self._view = Some(new_value.to_string()); self } + /// /// Append the given value to the *status* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// pub fn add_status(mut self, new_value: &str) -> PageListCall<'a, C, A> { self._status.push(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token if the request is paged. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> PageListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of Pages to fetch. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> PageListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *fetch bodies* query property to the given value. - /// - /// /// Whether to retrieve the Page bodies. + /// + /// Sets the *fetch bodies* query property to the given value. pub fn fetch_bodies(mut self, new_value: bool) -> PageListCall<'a, C, A> { self._fetch_bodies = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PageListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9748,8 +9654,8 @@ impl<'a, C, A> PageListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9935,33 +9841,32 @@ impl<'a, C, A> PageRevertCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the blog. pub fn blog_id(mut self, new_value: &str) -> PageRevertCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the page. + /// /// Sets the *page id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the page. pub fn page_id(mut self, new_value: &str) -> PageRevertCall<'a, C, A> { self._page_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PageRevertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9991,8 +9896,8 @@ impl<'a, C, A> PageRevertCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10196,40 +10101,38 @@ impl<'a, C, A> PageInsertCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Page) -> PageInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// ID of the blog to add the page to. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the blog to add the page to. pub fn blog_id(mut self, new_value: &str) -> PageInsertCall<'a, C, A> { self._blog_id = new_value.to_string(); self } - /// Sets the *is draft* query property to the given value. - /// - /// /// Whether to create the page as a draft (default: false). + /// + /// Sets the *is draft* query property to the given value. pub fn is_draft(mut self, new_value: bool) -> PageInsertCall<'a, C, A> { self._is_draft = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PageInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10259,8 +10162,8 @@ impl<'a, C, A> PageInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10471,58 +10374,55 @@ impl<'a, C, A> PagePatchCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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: &Page) -> PagePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the Blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PagePatchCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Page. + /// /// Sets the *page id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Page. pub fn page_id(mut self, new_value: &str) -> PagePatchCall<'a, C, A> { self._page_id = new_value.to_string(); self } - /// Sets the *revert* query property to the given value. - /// - /// /// Whether a revert action should be performed when the page is updated (default: false). + /// + /// Sets the *revert* query property to the given value. pub fn revert(mut self, new_value: bool) -> PagePatchCall<'a, C, A> { self._revert = Some(new_value); self } - /// Sets the *publish* query property to the given value. - /// - /// /// Whether a publish action should be performed when the page is updated (default: false). + /// + /// Sets the *publish* query property to the given value. pub fn publish(mut self, new_value: bool) -> PagePatchCall<'a, C, A> { self._publish = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PagePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10552,8 +10452,8 @@ impl<'a, C, A> PagePatchCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10739,33 +10639,32 @@ impl<'a, C, A> PagePublishCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the blog. pub fn blog_id(mut self, new_value: &str) -> PagePublishCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the page. + /// /// Sets the *page id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the page. pub fn page_id(mut self, new_value: &str) -> PagePublishCall<'a, C, A> { self._page_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PagePublishCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10795,8 +10694,8 @@ impl<'a, C, A> PagePublishCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11007,58 +10906,55 @@ impl<'a, C, A> PageUpdateCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Page) -> PageUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the Blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PageUpdateCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Page. + /// /// Sets the *page id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Page. pub fn page_id(mut self, new_value: &str) -> PageUpdateCall<'a, C, A> { self._page_id = new_value.to_string(); self } - /// Sets the *revert* query property to the given value. - /// - /// /// Whether a revert action should be performed when the page is updated (default: false). + /// + /// Sets the *revert* query property to the given value. pub fn revert(mut self, new_value: bool) -> PageUpdateCall<'a, C, A> { self._revert = Some(new_value); self } - /// Sets the *publish* query property to the given value. - /// - /// /// Whether a publish action should be performed when the page is updated (default: false). + /// + /// Sets the *publish* query property to the given value. pub fn publish(mut self, new_value: bool) -> PageUpdateCall<'a, C, A> { self._publish = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PageUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11088,8 +10984,8 @@ impl<'a, C, A> PageUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11264,33 +11160,32 @@ impl<'a, C, A> PageDeleteCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the Blog. + /// /// Sets the *blog id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PageDeleteCall<'a, C, A> { self._blog_id = new_value.to_string(); self } + /// The ID of the Page. + /// /// Sets the *page id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the Page. pub fn page_id(mut self, new_value: &str) -> PageDeleteCall<'a, C, A> { self._page_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PageDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11320,8 +11215,8 @@ impl<'a, C, A> PageDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/books1/README.md b/gen/books1/README.md index d874618e10..469c9a2510 100644 --- a/gen/books1/README.md +++ b/gen/books1/README.md @@ -132,16 +132,18 @@ let result = hub.volumes().list("q") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/books1/src/cmn.rs b/gen/books1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/books1/src/cmn.rs +++ b/gen/books1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/books1/src/lib.rs b/gen/books1/src/lib.rs index c15c48ec7b..8eff6e3974 100644 --- a/gen/books1/src/lib.rs +++ b/gen/books1/src/lib.rs @@ -133,16 +133,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -312,16 +314,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -396,7 +400,7 @@ impl<'a, C, A> Books /// /// * [list categories onboarding](struct.OnboardingListCategoryCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Category { /// A list of onboarding categories. pub items: Vec, @@ -411,7 +415,7 @@ impl ResponseResult for Category {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CategoryItems { /// no description provided #[serde(rename="badgeUrl")] @@ -431,7 +435,7 @@ impl Part for CategoryItems {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ConcurrentAccessRestriction { /// Client nonce for verification. Download access and client-validation only. pub nonce: String, @@ -469,7 +473,7 @@ impl Part for ConcurrentAccessRestriction {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeVolumeInfoDimensions { /// Width of this volume (in cm). pub width: String, @@ -487,7 +491,7 @@ impl Part for VolumeVolumeInfoDimensions {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeVolumeInfo { /// Volume subtitle. (In LITE projection.) pub subtitle: String, @@ -592,7 +596,7 @@ impl Part for AnnotationClientVersionRanges {} /// /// * [request access myconfig](struct.MyconfigRequestAccesCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RequestAccess { /// A download access response. #[serde(rename="downloadAccess")] @@ -611,7 +615,7 @@ impl ResponseResult for RequestAccess {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OffersItemsItems { /// no description provided pub description: String, @@ -643,7 +647,7 @@ impl Part for OffersItemsItems {} /// /// * [annotations list mylibrary](struct.MylibraryAnnotationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Annotations { /// Token to pass in for pagination for the next page. This will not be present if this request does not have more results. #[serde(rename="nextPageToken")] @@ -664,7 +668,7 @@ impl ResponseResult for Annotations {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeSaleInfoOffers { /// The rental duration (for rental offers only). #[serde(rename="rentalDuration")] @@ -693,7 +697,7 @@ impl Part for VolumeSaleInfoOffers {} /// /// * [list offline metadata dictionary](struct.DictionaryListOfflineMetadataCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Metadata { /// A list of offline dictionary metadata. pub items: Vec, @@ -719,7 +723,7 @@ impl ResponseResult for Metadata {} /// * [recommended list volumes](struct.VolumeRecommendedListCall.html) (none) /// * [mybooks list volumes](struct.VolumeMybookListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Volume { /// Resource type for a volume. (In LITE projection.) pub kind: String, @@ -761,7 +765,7 @@ impl ResponseResult for Volume {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeLayerInfo { /// A layer should appear here if and only if the layer exists for this book. pub layers: Vec, @@ -798,7 +802,7 @@ impl ResponseResult for Usersettings {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeRecommendedInfo { /// A text explaining why this volume is recommended. pub explanation: String, @@ -812,7 +816,7 @@ impl Part for VolumeRecommendedInfo {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MetadataItems { /// no description provided pub encrypted_key: String, @@ -834,7 +838,7 @@ impl Part for MetadataItems {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReviewAuthor { /// Name of this person. #[serde(rename="displayName")] @@ -855,7 +859,7 @@ impl Part for ReviewAuthor {} /// * [get bookshelves](struct.BookshelveGetCall.html) (response) /// * [bookshelves get mylibrary](struct.MylibraryBookshelveGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Bookshelf { /// Resource type for bookshelf metadata. pub kind: String, @@ -970,7 +974,7 @@ impl ResponseResult for Annotation {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Review { /// Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE or NOT_RATED. pub rating: String, @@ -1004,7 +1008,7 @@ impl Part for Review {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DownloadAccessRestriction { /// Client nonce for verification. Download access and client-validation only. pub nonce: String, @@ -1050,7 +1054,7 @@ impl Part for DownloadAccessRestriction {} /// /// * [release download access myconfig](struct.MyconfigReleaseDownloadAccesCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DownloadAccesses { /// A list of download access responses. #[serde(rename="downloadAccessList")] @@ -1066,7 +1070,7 @@ impl ResponseResult for DownloadAccesses {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReviewSource { /// Extra text about the source of the review. #[serde(rename="extraDescription")] @@ -1090,7 +1094,7 @@ impl Part for ReviewSource {} /// /// * [readingpositions get mylibrary](struct.MylibraryReadingpositionGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReadingPosition { /// Position in a PDF file. #[serde(rename="pdfPosition")] @@ -1120,7 +1124,7 @@ impl ResponseResult for ReadingPosition {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeSaleInfoOffersRetailPrice { /// no description provided #[serde(rename="currencyCode")] @@ -1138,7 +1142,7 @@ impl Part for VolumeSaleInfoOffersRetailPrice {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeSearchInfo { /// A text snippet containing the search query. #[serde(rename="textSnippet")] @@ -1153,7 +1157,7 @@ impl Part for VolumeSearchInfo {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AnnotationsSummaryLayers { /// no description provided #[serde(rename="limitType")] @@ -1184,7 +1188,7 @@ impl Part for AnnotationsSummaryLayers {} /// /// * [annotation data get layers](struct.LayerAnnotationDataGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Annotationdata { /// The type of annotation this data is for. #[serde(rename="annotationType")] @@ -1217,7 +1221,7 @@ impl ResponseResult for Annotationdata {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeVolumeInfoImageLinks { /// Image link for large size (width of ~800 pixels). (In LITE projection) pub large: String, @@ -1243,7 +1247,7 @@ impl Part for VolumeVolumeInfoImageLinks {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeSaleInfoRetailPrice { /// Amount in the currency listed below. (In LITE projection.) pub amount: f64, @@ -1265,7 +1269,7 @@ impl Part for VolumeSaleInfoRetailPrice {} /// /// * [get layers](struct.LayerGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Layersummary { /// Resource Type pub kind: String, @@ -1312,7 +1316,7 @@ impl ResponseResult for Layersummary {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeSaleInfoOffersListPrice { /// no description provided #[serde(rename="currencyCode")] @@ -1335,7 +1339,7 @@ impl Part for VolumeSaleInfoOffersListPrice {} /// /// * [volume annotations get layers](struct.LayerVolumeAnnotationGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Volumeannotation { /// The type of annotation this is. #[serde(rename="annotationType")] @@ -1388,7 +1392,7 @@ impl ResponseResult for Volumeannotation {} /// /// * [volume annotations list layers](struct.LayerVolumeAnnotationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Volumeannotations { /// Token to pass in for pagination for the next page. This will not be present if this request does not have more results. #[serde(rename="nextPageToken")] @@ -1416,7 +1420,7 @@ impl ResponseResult for Volumeannotations {} /// /// * [annotation data list layers](struct.LayerAnnotationDataListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Annotationsdata { /// Token to pass in for pagination for the next page. This will not be present if this request does not have more results. #[serde(rename="nextPageToken")] @@ -1437,7 +1441,7 @@ impl ResponseResult for Annotationsdata {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeVolumeInfoIndustryIdentifiers { /// Industry specific volume identifier. pub identifier: String, @@ -1480,7 +1484,7 @@ impl Part for AnnotationLayerSummary {} /// /// * [get promooffer](struct.PromoofferGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Offers { /// A list of offers. pub items: Vec, @@ -1495,7 +1499,7 @@ impl ResponseResult for Offers {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeAccessInfoEpub { /// Is a flowing text epub available either as public domain or for purchase. (In LITE projection.) #[serde(rename="isAvailable")] @@ -1521,7 +1525,7 @@ impl Part for VolumeAccessInfoEpub {} /// /// * [list category volumes onboarding](struct.OnboardingListCategoryVolumeCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Volume2 { /// no description provided #[serde(rename="nextPageToken")] @@ -1539,7 +1543,7 @@ impl ResponseResult for Volume2 {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeAccessInfoPdf { /// Is a scanned image pdf available either as public domain or for purchase. (In LITE projection.) #[serde(rename="isAvailable")] @@ -1565,7 +1569,7 @@ impl Part for VolumeAccessInfoPdf {} /// /// * [annotations summary mylibrary](struct.MylibraryAnnotationSummaryCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AnnotationsSummary { /// no description provided pub layers: Vec, @@ -1586,7 +1590,7 @@ impl ResponseResult for AnnotationsSummary {} /// * [bookshelves list mylibrary](struct.MylibraryBookshelveListCall.html) (response) /// * [list bookshelves](struct.BookshelveListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Bookshelves { /// A list of bookshelves. pub items: Vec, @@ -1601,7 +1605,7 @@ impl ResponseResult for Bookshelves {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeLayerInfoLayers { /// The current version of this layer's volume annotations. Note that this version applies only to the data in the books.layers.volumeAnnotations.* responses. The actual annotation data is versioned separately. #[serde(rename="volumeAnnotationsVersion")] @@ -1624,7 +1628,7 @@ impl Part for VolumeLayerInfoLayers {} /// /// * [list layers](struct.LayerListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Layersummaries { /// The total number of layer summaries found. #[serde(rename="totalItems")] @@ -1642,7 +1646,7 @@ impl ResponseResult for Layersummaries {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OffersItems { /// no description provided #[serde(rename="gservicesKey")] @@ -1664,7 +1668,7 @@ impl Part for OffersItems {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeUserInfoCopy { /// no description provided #[serde(rename="limitType")] @@ -1692,7 +1696,7 @@ impl Part for VolumeUserInfoCopy {} /// /// * [recommended rate volumes](struct.VolumeRecommendedRateCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BooksVolumesRecommendedRateResponse { /// no description provided pub consistency_token: String, @@ -1705,7 +1709,7 @@ impl ResponseResult for BooksVolumesRecommendedRateResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeUserInfo { /// Whether or not this volume is currently in "my books." #[serde(rename="isInMyBooks")] @@ -1775,7 +1779,7 @@ impl ResponseResult for BooksCloudloadingResource {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeUserInfoUserUploadedVolumeInfo { /// no description provided #[serde(rename="processingState")] @@ -1790,7 +1794,7 @@ impl Part for VolumeUserInfoUserUploadedVolumeInfo {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeSaleInfoListPrice { /// Amount in the currency listed below. (In LITE projection.) pub amount: f64, @@ -1830,7 +1834,7 @@ impl Part for BooksAnnotationsRange {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeAccessInfo { /// URL to read this volume on the Google Books site. Link will not allow users to read non-viewable volumes. #[serde(rename="webReaderLink")] @@ -1906,7 +1910,7 @@ impl Part for AnnotationCurrentVersionRanges {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeSaleInfo { /// The two-letter ISO_3166-1 country code for which this sale information is valid. (In LITE projection.) pub country: String, @@ -1951,7 +1955,7 @@ impl Part for VolumeSaleInfo {} /// * [bookshelves volumes list mylibrary](struct.MylibraryBookshelveVolumeListCall.html) (response) /// * [mybooks list volumes](struct.VolumeMybookListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Volumes { /// Total number of volumes found. This might be greater than the number of volumes returned in this response if results have been paginated. #[serde(rename="totalItems")] @@ -1969,7 +1973,7 @@ impl ResponseResult for Volumes {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeUserInfoRentalPeriod { /// no description provided #[serde(rename="startUtcSec")] @@ -1987,7 +1991,7 @@ impl Part for VolumeUserInfoRentalPeriod {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeannotationContentRanges { /// Range in GB image format for this annotation for version above. #[serde(rename="gbImageRange")] @@ -2011,7 +2015,7 @@ impl Part for VolumeannotationContentRanges {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VolumeSaleInfoOffersRentalDuration { /// no description provided pub count: f64, @@ -3501,101 +3505,94 @@ impl<'a, C, A> LayerAnnotationDataGetCall<'a, C, A> where C: BorrowMut LayerAnnotationDataGetCall<'a, C, A> { self._volume_id = new_value.to_string(); self } + /// The ID for the layer to get the annotations. + /// /// Sets the *layer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the layer to get the annotations. pub fn layer_id(mut self, new_value: &str) -> LayerAnnotationDataGetCall<'a, C, A> { self._layer_id = new_value.to_string(); self } + /// The ID of the annotation data to retrieve. + /// /// Sets the *annotation data id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the annotation data to retrieve. pub fn annotation_data_id(mut self, new_value: &str) -> LayerAnnotationDataGetCall<'a, C, A> { self._annotation_data_id = new_value.to_string(); self } + /// The content version for the volume you are trying to retrieve. + /// /// Sets the *content version* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The content version for the volume you are trying to retrieve. pub fn content_version(mut self, new_value: &str) -> LayerAnnotationDataGetCall<'a, C, A> { self._content_version = new_value.to_string(); self } - /// Sets the *w* query property to the given value. - /// - /// /// The requested pixel width for any images. If width is provided height must also be provided. + /// + /// Sets the *w* query property to the given value. pub fn w(mut self, new_value: i32) -> LayerAnnotationDataGetCall<'a, C, A> { self._w = Some(new_value); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> LayerAnnotationDataGetCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *scale* query property to the given value. - /// - /// /// The requested scale for the image. + /// + /// Sets the *scale* query property to the given value. pub fn scale(mut self, new_value: i32) -> LayerAnnotationDataGetCall<'a, C, A> { self._scale = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> LayerAnnotationDataGetCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *h* query property to the given value. - /// - /// /// The requested pixel height for any images. If height is provided width must also be provided. + /// + /// Sets the *h* query property to the given value. pub fn h(mut self, new_value: i32) -> LayerAnnotationDataGetCall<'a, C, A> { self._h = Some(new_value); self } - /// Sets the *allow web definitions* query property to the given value. - /// - /// /// For the dictionary layer. Whether or not to allow web definitions. + /// + /// Sets the *allow web definitions* query property to the given value. pub fn allow_web_definitions(mut self, new_value: bool) -> LayerAnnotationDataGetCall<'a, C, A> { self._allow_web_definitions = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LayerAnnotationDataGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3625,8 +3622,8 @@ impl<'a, C, A> LayerAnnotationDataGetCall<'a, C, A> where C: BorrowMut LayerVolumeAnnotationGetCall<'a, C, A> where C: BorrowMut LayerVolumeAnnotationGetCall<'a, C, A> { self._volume_id = new_value.to_string(); self } + /// The ID for the layer to get the annotations. + /// /// Sets the *layer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the layer to get the annotations. pub fn layer_id(mut self, new_value: &str) -> LayerVolumeAnnotationGetCall<'a, C, A> { self._layer_id = new_value.to_string(); self } + /// The ID of the volume annotation to retrieve. + /// /// Sets the *annotation id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the volume annotation to retrieve. pub fn annotation_id(mut self, new_value: &str) -> LayerVolumeAnnotationGetCall<'a, C, A> { self._annotation_id = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> LayerVolumeAnnotationGetCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *locale* query property to the given value. - /// - /// /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> LayerVolumeAnnotationGetCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LayerVolumeAnnotationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3906,8 +3900,8 @@ impl<'a, C, A> LayerVolumeAnnotationGetCall<'a, C, A> where C: BorrowMut LayerListCall<'a, C, A> where C: BorrowMut, A: oau } + /// The volume to retrieve layers for. + /// /// Sets the *volume id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The volume to retrieve layers for. pub fn volume_id(mut self, new_value: &str) -> LayerListCall<'a, C, A> { self._volume_id = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> LayerListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of the nextToken from the previous page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> LayerListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> LayerListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *content version* query property to the given value. - /// - /// /// The content version for the requested volume. + /// + /// Sets the *content version* query property to the given value. pub fn content_version(mut self, new_value: &str) -> LayerListCall<'a, C, A> { self._content_version = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LayerListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4189,8 +4178,8 @@ impl<'a, C, A> LayerListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4386,49 +4375,46 @@ impl<'a, C, A> LayerGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// The volume to retrieve layers for. + /// /// Sets the *volume id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The volume to retrieve layers for. pub fn volume_id(mut self, new_value: &str) -> LayerGetCall<'a, C, A> { self._volume_id = new_value.to_string(); self } + /// The ID for the layer to get the summary for. + /// /// Sets the *summary id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the layer to get the summary for. pub fn summary_id(mut self, new_value: &str) -> LayerGetCall<'a, C, A> { self._summary_id = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> LayerGetCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *content version* query property to the given value. - /// - /// /// The content version for the requested volume. + /// + /// Sets the *content version* query property to the given value. pub fn content_version(mut self, new_value: &str) -> LayerGetCall<'a, C, A> { self._content_version = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LayerGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4458,8 +4444,8 @@ impl<'a, C, A> LayerGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4707,139 +4693,126 @@ impl<'a, C, A> LayerVolumeAnnotationListCall<'a, C, A> where C: BorrowMut LayerVolumeAnnotationListCall<'a, C, A> { self._volume_id = new_value.to_string(); self } + /// The ID for the layer to get the annotations. + /// /// Sets the *layer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the layer to get the annotations. pub fn layer_id(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._layer_id = new_value.to_string(); self } + /// The content version for the requested volume. + /// /// Sets the *content version* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The content version for the requested volume. pub fn content_version(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._content_version = new_value.to_string(); self } - /// Sets the *volume annotations version* query property to the given value. - /// - /// /// The version of the volume annotations that you are requesting. + /// + /// Sets the *volume annotations version* query property to the given value. pub fn volume_annotations_version(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._volume_annotations_version = Some(new_value.to_string()); self } - /// Sets the *updated min* query property to the given value. - /// - /// /// RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). + /// + /// Sets the *updated min* query property to the given value. pub fn updated_min(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._updated_min = Some(new_value.to_string()); self } - /// Sets the *updated max* query property to the given value. - /// - /// /// RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). + /// + /// Sets the *updated max* query property to the given value. pub fn updated_max(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._updated_max = Some(new_value.to_string()); self } - /// Sets the *start position* query property to the given value. - /// - /// /// The start position to start retrieving data from. + /// + /// Sets the *start position* query property to the given value. pub fn start_position(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._start_position = Some(new_value.to_string()); self } - /// Sets the *start offset* query property to the given value. - /// - /// /// The start offset to start retrieving data from. + /// + /// Sets the *start offset* query property to the given value. pub fn start_offset(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._start_offset = Some(new_value.to_string()); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *show deleted* query property to the given value. - /// - /// /// Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false. + /// + /// Sets the *show deleted* query property to the given value. pub fn show_deleted(mut self, new_value: bool) -> LayerVolumeAnnotationListCall<'a, C, A> { self._show_deleted = Some(new_value); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of the nextToken from the previous page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> LayerVolumeAnnotationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *end position* query property to the given value. - /// - /// /// The end position to end retrieving data from. + /// + /// Sets the *end position* query property to the given value. pub fn end_position(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._end_position = Some(new_value.to_string()); self } - /// Sets the *end offset* query property to the given value. - /// - /// /// The end offset to end retrieving data from. + /// + /// Sets the *end offset* query property to the given value. pub fn end_offset(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, A> { self._end_offset = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LayerVolumeAnnotationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4869,8 +4842,8 @@ impl<'a, C, A> LayerVolumeAnnotationListCall<'a, C, A> where C: BorrowMut LayerAnnotationDataListCall<'a, C, A> where C: BorrowMut LayerAnnotationDataListCall<'a, C, A> { self._volume_id = new_value.to_string(); self } + /// The ID for the layer to get the annotation data. + /// /// Sets the *layer id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the layer to get the annotation data. pub fn layer_id(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, A> { self._layer_id = new_value.to_string(); self } + /// The content version for the requested volume. + /// /// Sets the *content version* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The content version for the requested volume. pub fn content_version(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, A> { self._content_version = new_value.to_string(); self } - /// Sets the *w* query property to the given value. - /// - /// /// The requested pixel width for any images. If width is provided height must also be provided. + /// + /// Sets the *w* query property to the given value. pub fn w(mut self, new_value: i32) -> LayerAnnotationDataListCall<'a, C, A> { self._w = Some(new_value); self } - /// Sets the *updated min* query property to the given value. - /// - /// /// RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). + /// + /// Sets the *updated min* query property to the given value. pub fn updated_min(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, A> { self._updated_min = Some(new_value.to_string()); self } - /// Sets the *updated max* query property to the given value. - /// - /// /// RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). + /// + /// Sets the *updated max* query property to the given value. pub fn updated_max(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, A> { self._updated_max = Some(new_value.to_string()); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *scale* query property to the given value. - /// - /// /// The requested scale for the image. + /// + /// Sets the *scale* query property to the given value. pub fn scale(mut self, new_value: i32) -> LayerAnnotationDataListCall<'a, C, A> { self._scale = Some(new_value); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of the nextToken from the previous page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> LayerAnnotationDataListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *h* query property to the given value. - /// - /// /// The requested pixel height for any images. If height is provided width must also be provided. + /// + /// Sets the *h* query property to the given value. pub fn h(mut self, new_value: i32) -> LayerAnnotationDataListCall<'a, C, A> { self._h = Some(new_value); self } + /// The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set. + /// /// Append the given value to the *annotation data id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set. pub fn add_annotation_data_id(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, A> { self._annotation_data_id.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LayerAnnotationDataListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5259,8 +5221,8 @@ impl<'a, C, A> LayerAnnotationDataListCall<'a, C, A> where C: BorrowMut VolumeRecommendedRateCall<'a, C, A> where C: BorrowMut VolumeRecommendedRateCall<'a, C, A> { self._rating = new_value.to_string(); self } + /// ID of the source volume. + /// /// Sets the *volume id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the source volume. pub fn volume_id(mut self, new_value: &str) -> VolumeRecommendedRateCall<'a, C, A> { self._volume_id = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> VolumeRecommendedRateCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *locale* query property to the given value. - /// - /// /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> VolumeRecommendedRateCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VolumeRecommendedRateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5504,8 +5463,8 @@ impl<'a, C, A> VolumeRecommendedRateCall<'a, C, A> where C: BorrowMut VolumeMybookListCall<'a, C, A> where C: BorrowMut, } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first result to return (starts at 0) + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: u32) -> VolumeMybookListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> VolumeMybookListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } + /// The processing state of the user uploaded volumes to be returned. Applicable only if the UPLOADED is specified in the acquireMethod. + /// /// Append the given value to the *processing state* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The processing state of the user uploaded volumes to be returned. Applicable only if the UPLOADED is specified in the acquireMethod. pub fn add_processing_state(mut self, new_value: &str) -> VolumeMybookListCall<'a, C, A> { self._processing_state.push(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> VolumeMybookListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for generating recommendations. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> VolumeMybookListCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } + /// How the book was aquired + /// /// Append the given value to the *acquire method* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// How the book was aquired pub fn add_acquire_method(mut self, new_value: &str) -> VolumeMybookListCall<'a, C, A> { self._acquire_method.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VolumeMybookListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5787,8 +5739,8 @@ impl<'a, C, A> VolumeMybookListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6008,119 +5960,106 @@ impl<'a, C, A> VolumeListCall<'a, C, A> where C: BorrowMut, A: oa } + /// Full-text search query string. + /// /// Sets the *q* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Full-text search query string. pub fn q(mut self, new_value: &str) -> VolumeListCall<'a, C, A> { self._q = new_value.to_string(); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first result to return (starts at 0) + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: u32) -> VolumeListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> VolumeListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *show preorders* query property to the given value. - /// - /// /// Set to true to show books available for preorder. Defaults to false. + /// + /// Sets the *show preorders* query property to the given value. pub fn show_preorders(mut self, new_value: bool) -> VolumeListCall<'a, C, A> { self._show_preorders = Some(new_value); self } - /// Sets the *projection* query property to the given value. - /// - /// /// Restrict information returned to a set of selected fields. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> VolumeListCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *print type* query property to the given value. - /// - /// /// Restrict to books or magazines. + /// + /// Sets the *print type* query property to the given value. pub fn print_type(mut self, new_value: &str) -> VolumeListCall<'a, C, A> { self._print_type = Some(new_value.to_string()); self } - /// Sets the *partner* query property to the given value. - /// - /// /// Restrict and brand results for partner ID. + /// + /// Sets the *partner* query property to the given value. pub fn partner(mut self, new_value: &str) -> VolumeListCall<'a, C, A> { self._partner = Some(new_value.to_string()); self } - /// Sets the *order by* query property to the given value. - /// - /// /// Sort search results. + /// + /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> VolumeListCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> VolumeListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *library restrict* query property to the given value. - /// - /// /// Restrict search to this user's library. + /// + /// Sets the *library restrict* query property to the given value. pub fn library_restrict(mut self, new_value: &str) -> VolumeListCall<'a, C, A> { self._library_restrict = Some(new_value.to_string()); self } - /// Sets the *lang restrict* query property to the given value. - /// - /// /// Restrict results to books with this language code. + /// + /// Sets the *lang restrict* query property to the given value. pub fn lang_restrict(mut self, new_value: &str) -> VolumeListCall<'a, C, A> { self._lang_restrict = Some(new_value.to_string()); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Filter search results. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> VolumeListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *download* query property to the given value. - /// - /// /// Restrict to volumes by download availability. + /// + /// Sets the *download* query property to the given value. pub fn download(mut self, new_value: &str) -> VolumeListCall<'a, C, A> { self._download = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VolumeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6150,8 +6089,8 @@ impl<'a, C, A> VolumeListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6347,63 +6286,56 @@ impl<'a, C, A> VolumeUseruploadedListCall<'a, C, A> where C: BorrowMut VolumeUseruploadedListCall<'a, C, A> { self._volume_id.push(new_value.to_string()); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first result to return (starts at 0) + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: u32) -> VolumeUseruploadedListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> VolumeUseruploadedListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } + /// The processing state of the user uploaded volumes to be returned. + /// /// Append the given value to the *processing state* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The processing state of the user uploaded volumes to be returned. pub fn add_processing_state(mut self, new_value: &str) -> VolumeUseruploadedListCall<'a, C, A> { self._processing_state.push(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> VolumeUseruploadedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> VolumeUseruploadedListCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VolumeUseruploadedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6433,8 +6365,8 @@ impl<'a, C, A> VolumeUseruploadedListCall<'a, C, A> where C: BorrowMut VolumeAssociatedListCall<'a, C, A> where C: BorrowMut VolumeAssociatedListCall<'a, C, A> { self._volume_id = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> VolumeAssociatedListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *locale* query property to the given value. - /// - /// /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> VolumeAssociatedListCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *association* query property to the given value. - /// - /// /// Association type. + /// + /// Sets the *association* query property to the given value. pub fn association(mut self, new_value: &str) -> VolumeAssociatedListCall<'a, C, A> { self._association = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VolumeAssociatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6703,8 +6631,8 @@ impl<'a, C, A> VolumeAssociatedListCall<'a, C, A> where C: BorrowMut VolumeGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// ID of volume to retrieve. + /// /// Sets the *volume id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of volume to retrieve. pub fn volume_id(mut self, new_value: &str) -> VolumeGetCall<'a, C, A> { self._volume_id = new_value.to_string(); self } - /// Sets the *user_library_consistent_read* query property to the given value. /// - /// + /// Sets the *user_library_consistent_read* query property to the given value. pub fn user_library_consistent_read(mut self, new_value: bool) -> VolumeGetCall<'a, C, A> { self._user_library_consistent_read = Some(new_value); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> VolumeGetCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *projection* query property to the given value. - /// - /// /// Restrict information returned to a set of selected fields. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> VolumeGetCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *partner* query property to the given value. - /// - /// /// Brand results for partner ID. + /// + /// Sets the *partner* query property to the given value. pub fn partner(mut self, new_value: &str) -> VolumeGetCall<'a, C, A> { self._partner = Some(new_value.to_string()); self } - /// Sets the *country* query property to the given value. - /// - /// /// ISO-3166-1 code to override the IP-based location. + /// + /// Sets the *country* query property to the given value. pub fn country(mut self, new_value: &str) -> VolumeGetCall<'a, C, A> { self._country = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VolumeGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6998,8 +6920,8 @@ impl<'a, C, A> VolumeGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7167,29 +7089,26 @@ impl<'a, C, A> VolumeRecommendedListCall<'a, C, A> where C: BorrowMut VolumeRecommendedListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *locale* query property to the given value. - /// - /// /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> VolumeRecommendedListCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VolumeRecommendedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7219,8 +7138,8 @@ impl<'a, C, A> VolumeRecommendedListCall<'a, C, A> where C: BorrowMut DictionaryListOfflineMetadataCall<'a, C, A> where C: BorrowMut DictionaryListOfflineMetadataCall<'a, C, A> { self._cpksver = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DictionaryListOfflineMetadataCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7426,8 +7344,8 @@ impl<'a, C, A> DictionaryListOfflineMetadataCall<'a, C, A> where C: BorrowMut BookshelveVolumeListCall<'a, C, A> where C: BorrowMut BookshelveVolumeListCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// ID of bookshelf to retrieve volumes. + /// /// Sets the *shelf* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of bookshelf to retrieve volumes. pub fn shelf(mut self, new_value: &str) -> BookshelveVolumeListCall<'a, C, A> { self._shelf = new_value.to_string(); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first element to return (starts at 0) + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: u32) -> BookshelveVolumeListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> BookshelveVolumeListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *show preorders* query property to the given value. - /// - /// /// Set to true to show pre-ordered books. Defaults to false. + /// + /// Sets the *show preorders* query property to the given value. pub fn show_preorders(mut self, new_value: bool) -> BookshelveVolumeListCall<'a, C, A> { self._show_preorders = Some(new_value); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> BookshelveVolumeListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BookshelveVolumeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7721,8 +7634,8 @@ impl<'a, C, A> BookshelveVolumeListCall<'a, C, A> where C: BorrowMut BookshelveListCall<'a, C, A> where C: BorrowMut, A } + /// ID of user for whom to retrieve bookshelves. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of user for whom to retrieve bookshelves. pub fn user_id(mut self, new_value: &str) -> BookshelveListCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> BookshelveListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BookshelveListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7965,8 +7876,8 @@ impl<'a, C, A> BookshelveListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8157,41 +8068,39 @@ impl<'a, C, A> BookshelveGetCall<'a, C, A> where C: BorrowMut, A: } + /// ID of user for whom to retrieve bookshelves. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of user for whom to retrieve bookshelves. pub fn user_id(mut self, new_value: &str) -> BookshelveGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// ID of bookshelf to retrieve. + /// /// Sets the *shelf* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of bookshelf to retrieve. pub fn shelf(mut self, new_value: &str) -> BookshelveGetCall<'a, C, A> { self._shelf = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> BookshelveGetCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BookshelveGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8221,8 +8130,8 @@ impl<'a, C, A> BookshelveGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8409,76 +8318,67 @@ impl<'a, C, A> PromoofferAcceptCall<'a, C, A> where C: BorrowMut, } - /// Sets the *volume id* query property to the given value. - /// - /// /// Volume id to exercise the offer + /// + /// Sets the *volume id* query property to the given value. pub fn volume_id(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, A> { self._volume_id = Some(new_value.to_string()); self } - /// Sets the *serial* query property to the given value. - /// - /// /// device serial + /// + /// Sets the *serial* query property to the given value. pub fn serial(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, A> { self._serial = Some(new_value.to_string()); self } - /// Sets the *product* query property to the given value. - /// - /// /// device product + /// + /// Sets the *product* query property to the given value. pub fn product(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, A> { self._product = Some(new_value.to_string()); self } - /// Sets the *offer id* query property to the given value. /// - /// + /// Sets the *offer id* query property to the given value. pub fn offer_id(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, A> { self._offer_id = Some(new_value.to_string()); self } - /// Sets the *model* query property to the given value. - /// - /// /// device model + /// + /// Sets the *model* query property to the given value. pub fn model(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, A> { self._model = Some(new_value.to_string()); self } - /// Sets the *manufacturer* query property to the given value. - /// - /// /// device manufacturer + /// + /// Sets the *manufacturer* query property to the given value. pub fn manufacturer(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, A> { self._manufacturer = Some(new_value.to_string()); self } - /// Sets the *device* query property to the given value. - /// - /// /// device device + /// + /// Sets the *device* query property to the given value. pub fn device(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, A> { self._device = Some(new_value.to_string()); self } - /// Sets the *android id* query property to the given value. - /// - /// /// device android_id + /// + /// Sets the *android id* query property to the given value. pub fn android_id(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, A> { self._android_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PromoofferAcceptCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8508,8 +8408,8 @@ impl<'a, C, A> PromoofferAcceptCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8691,69 +8591,61 @@ impl<'a, C, A> PromoofferDismisCall<'a, C, A> where C: BorrowMut, } - /// Sets the *serial* query property to the given value. - /// - /// /// device serial + /// + /// Sets the *serial* query property to the given value. pub fn serial(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, A> { self._serial = Some(new_value.to_string()); self } - /// Sets the *product* query property to the given value. - /// - /// /// device product + /// + /// Sets the *product* query property to the given value. pub fn product(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, A> { self._product = Some(new_value.to_string()); self } - /// Sets the *offer id* query property to the given value. - /// - /// /// Offer to dimiss + /// + /// Sets the *offer id* query property to the given value. pub fn offer_id(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, A> { self._offer_id = Some(new_value.to_string()); self } - /// Sets the *model* query property to the given value. - /// - /// /// device model + /// + /// Sets the *model* query property to the given value. pub fn model(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, A> { self._model = Some(new_value.to_string()); self } - /// Sets the *manufacturer* query property to the given value. - /// - /// /// device manufacturer + /// + /// Sets the *manufacturer* query property to the given value. pub fn manufacturer(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, A> { self._manufacturer = Some(new_value.to_string()); self } - /// Sets the *device* query property to the given value. - /// - /// /// device device + /// + /// Sets the *device* query property to the given value. pub fn device(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, A> { self._device = Some(new_value.to_string()); self } - /// Sets the *android id* query property to the given value. - /// - /// /// device android_id + /// + /// Sets the *android id* query property to the given value. pub fn android_id(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, A> { self._android_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PromoofferDismisCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8783,8 +8675,8 @@ impl<'a, C, A> PromoofferDismisCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8972,61 +8864,54 @@ impl<'a, C, A> PromoofferGetCall<'a, C, A> where C: BorrowMut, A: } - /// Sets the *serial* query property to the given value. - /// - /// /// device serial + /// + /// Sets the *serial* query property to the given value. pub fn serial(mut self, new_value: &str) -> PromoofferGetCall<'a, C, A> { self._serial = Some(new_value.to_string()); self } - /// Sets the *product* query property to the given value. - /// - /// /// device product + /// + /// Sets the *product* query property to the given value. pub fn product(mut self, new_value: &str) -> PromoofferGetCall<'a, C, A> { self._product = Some(new_value.to_string()); self } - /// Sets the *model* query property to the given value. - /// - /// /// device model + /// + /// Sets the *model* query property to the given value. pub fn model(mut self, new_value: &str) -> PromoofferGetCall<'a, C, A> { self._model = Some(new_value.to_string()); self } - /// Sets the *manufacturer* query property to the given value. - /// - /// /// device manufacturer + /// + /// Sets the *manufacturer* query property to the given value. pub fn manufacturer(mut self, new_value: &str) -> PromoofferGetCall<'a, C, A> { self._manufacturer = Some(new_value.to_string()); self } - /// Sets the *device* query property to the given value. - /// - /// /// device device + /// + /// Sets the *device* query property to the given value. pub fn device(mut self, new_value: &str) -> PromoofferGetCall<'a, C, A> { self._device = Some(new_value.to_string()); self } - /// Sets the *android id* query property to the given value. - /// - /// /// device android_id + /// + /// Sets the *android id* query property to the given value. pub fn android_id(mut self, new_value: &str) -> PromoofferGetCall<'a, C, A> { self._android_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PromoofferGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9056,8 +8941,8 @@ impl<'a, C, A> PromoofferGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9220,21 +9105,19 @@ impl<'a, C, A> OnboardingListCategoryCall<'a, C, A> where C: BorrowMut OnboardingListCategoryCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OnboardingListCategoryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9264,8 +9147,8 @@ impl<'a, C, A> OnboardingListCategoryCall<'a, C, A> where C: BorrowMut OnboardingListCategoryVolumeCall<'a, C, A> where C: BorrowMut OnboardingListCategoryVolumeCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *page size* query property to the given value. - /// - /// /// Number of maximum results per page to be included in the response. + /// + /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: u32) -> OnboardingListCategoryVolumeCall<'a, C, A> { self._page_size = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> OnboardingListCategoryVolumeCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } + /// List of category ids requested. + /// /// Append the given value to the *category id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// List of category ids requested. pub fn add_category_id(mut self, new_value: &str) -> OnboardingListCategoryVolumeCall<'a, C, A> { self._category_id.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OnboardingListCategoryVolumeCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9516,8 +9394,8 @@ impl<'a, C, A> OnboardingListCategoryVolumeCall<'a, C, A> where C: BorrowMut MyconfigRequestAccesCall<'a, C, A> where C: BorrowMut MyconfigRequestAccesCall<'a, C, A> { self._source = new_value.to_string(); self } + /// The volume to request concurrent/download restrictions for. + /// /// Sets the *volume id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The volume to request concurrent/download restrictions for. pub fn volume_id(mut self, new_value: &str) -> MyconfigRequestAccesCall<'a, C, A> { self._volume_id = new_value.to_string(); self } + /// The client nonce value. + /// /// Sets the *nonce* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The client nonce value. pub fn nonce(mut self, new_value: &str) -> MyconfigRequestAccesCall<'a, C, A> { self._nonce = new_value.to_string(); self } + /// The device/version ID from which to request the restrictions. + /// /// Sets the *cpksver* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The device/version ID from which to request the restrictions. pub fn cpksver(mut self, new_value: &str) -> MyconfigRequestAccesCall<'a, C, A> { self._cpksver = new_value.to_string(); self } - /// Sets the *locale* query property to the given value. - /// - /// /// ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> MyconfigRequestAccesCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *license types* query property to the given value. - /// - /// /// The type of access license to request. If not specified, the default is BOTH. + /// + /// Sets the *license types* query property to the given value. pub fn license_types(mut self, new_value: &str) -> MyconfigRequestAccesCall<'a, C, A> { self._license_types = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MyconfigRequestAccesCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9785,8 +9660,8 @@ impl<'a, C, A> MyconfigRequestAccesCall<'a, C, A> where C: BorrowMut MyconfigReleaseDownloadAccesCall<'a, C, A> where C: BorrowMut MyconfigReleaseDownloadAccesCall<'a, C, A> { self._volume_ids.push(new_value.to_string()); self } + /// The device/version ID from which to release the restriction. + /// /// Sets the *cpksver* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The device/version ID from which to release the restriction. pub fn cpksver(mut self, new_value: &str) -> MyconfigReleaseDownloadAccesCall<'a, C, A> { self._cpksver = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MyconfigReleaseDownloadAccesCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *locale* query property to the given value. - /// - /// /// ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> MyconfigReleaseDownloadAccesCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MyconfigReleaseDownloadAccesCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10037,8 +9909,8 @@ impl<'a, C, A> MyconfigReleaseDownloadAccesCall<'a, C, A> where C: BorrowMut MyconfigSyncVolumeLicenseCall<'a, C, A> where C: BorrowMut MyconfigSyncVolumeLicenseCall<'a, C, A> { self._source = new_value.to_string(); self } + /// The client nonce value. + /// /// Sets the *nonce* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The client nonce value. pub fn nonce(mut self, new_value: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, A> { self._nonce = new_value.to_string(); self } + /// The device/version ID from which to release the restriction. + /// /// Sets the *cpksver* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The device/version ID from which to release the restriction. pub fn cpksver(mut self, new_value: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, A> { self._cpksver = new_value.to_string(); self } + /// The volume(s) to request download restrictions for. + /// /// Append the given value to the *volume ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The volume(s) to request download restrictions for. pub fn add_volume_ids(mut self, new_value: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, A> { self._volume_ids.push(new_value.to_string()); self } - /// Sets the *show preorders* query property to the given value. - /// - /// /// Set to true to show pre-ordered books. Defaults to false. + /// + /// Sets the *show preorders* query property to the given value. pub fn show_preorders(mut self, new_value: bool) -> MyconfigSyncVolumeLicenseCall<'a, C, A> { self._show_preorders = Some(new_value); self } - /// Sets the *locale* query property to the given value. - /// - /// /// ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. + /// + /// Sets the *locale* query property to the given value. pub fn locale(mut self, new_value: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, A> { self._locale = Some(new_value.to_string()); self } + /// List of features supported by the client, i.e., 'RENTALS' + /// /// Append the given value to the *features* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// List of features supported by the client, i.e., 'RENTALS' pub fn add_features(mut self, new_value: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, A> { self._features.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MyconfigSyncVolumeLicenseCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10330,8 +10197,8 @@ impl<'a, C, A> MyconfigSyncVolumeLicenseCall<'a, C, A> where C: BorrowMut MyconfigGetUserSettingCall<'a, C, A> where C: BorrowMut MyconfigGetUserSettingCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10525,8 +10391,8 @@ impl<'a, C, A> MyconfigGetUserSettingCall<'a, C, A> where C: BorrowMut MyconfigUpdateUserSettingCall<'a, C, A> where C: BorrowMut MyconfigUpdateUserSettingCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MyconfigUpdateUserSettingCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10744,8 +10609,8 @@ impl<'a, C, A> MyconfigUpdateUserSettingCall<'a, C, A> where C: BorrowMut MylibraryBookshelveClearVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveClearVolumeCall<'a, C, A> { self._shelf = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveClearVolumeCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryBookshelveClearVolumeCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10977,8 +10840,8 @@ impl<'a, C, A> MylibraryBookshelveClearVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveMoveVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveMoveVolumeCall<'a, C, A> { self._shelf = new_value.to_string(); self } + /// ID of volume to move. + /// /// Sets the *volume id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of volume to move. pub fn volume_id(mut self, new_value: &str) -> MylibraryBookshelveMoveVolumeCall<'a, C, A> { self._volume_id = new_value.to_string(); self } + /// Position on shelf to move the item (0 puts the item before the current first item, 1 puts it between the first and the second and so on.) + /// /// Sets the *volume position* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Position on shelf to move the item (0 puts the item before the current first item, 1 puts it between the first and the second and so on.) pub fn volume_position(mut self, new_value: i32) -> MylibraryBookshelveMoveVolumeCall<'a, C, A> { self._volume_position = new_value; self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveMoveVolumeCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryBookshelveMoveVolumeCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11234,8 +11095,8 @@ impl<'a, C, A> MylibraryBookshelveMoveVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveVolumeListCall<'a, C, A> where C: BorrowMut MylibraryBookshelveVolumeListCall<'a, C, A> { self._shelf = new_value.to_string(); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first element to return (starts at 0) + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: u32) -> MylibraryBookshelveVolumeListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveVolumeListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *show preorders* query property to the given value. - /// - /// /// Set to true to show pre-ordered books. Defaults to false. + /// + /// Sets the *show preorders* query property to the given value. pub fn show_preorders(mut self, new_value: bool) -> MylibraryBookshelveVolumeListCall<'a, C, A> { self._show_preorders = Some(new_value); self } - /// Sets the *q* query property to the given value. - /// - /// /// Full-text search query string in this bookshelf. + /// + /// Sets the *q* query property to the given value. pub fn q(mut self, new_value: &str) -> MylibraryBookshelveVolumeListCall<'a, C, A> { self._q = Some(new_value.to_string()); self } - /// Sets the *projection* query property to the given value. - /// - /// /// Restrict information returned to a set of selected fields. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> MylibraryBookshelveVolumeListCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> MylibraryBookshelveVolumeListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *country* query property to the given value. - /// - /// /// ISO-3166-1 code to override the IP-based location. + /// + /// Sets the *country* query property to the given value. pub fn country(mut self, new_value: &str) -> MylibraryBookshelveVolumeListCall<'a, C, A> { self._country = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryBookshelveVolumeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11556,8 +11409,8 @@ impl<'a, C, A> MylibraryBookshelveVolumeListCall<'a, C, A> where C: BorrowMut MylibraryAnnotationSummaryCall<'a, C, A> where C: BorrowMut MylibraryAnnotationSummaryCall<'a, C, A> { self._layer_ids.push(new_value.to_string()); self } + /// Volume id to get the summary for. + /// /// Sets the *volume id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Volume id to get the summary for. pub fn volume_id(mut self, new_value: &str) -> MylibraryAnnotationSummaryCall<'a, C, A> { self._volume_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryAnnotationSummaryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11782,8 +11634,8 @@ impl<'a, C, A> MylibraryAnnotationSummaryCall<'a, C, A> where C: BorrowMut MylibraryAnnotationDeleteCall<'a, C, A> where C: BorrowMut MylibraryAnnotationDeleteCall<'a, C, A> { self._annotation_id = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryAnnotationDeleteCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryAnnotationDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12015,8 +11865,8 @@ impl<'a, C, A> MylibraryAnnotationDeleteCall<'a, C, A> where C: BorrowMut MylibraryBookshelveAddVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveAddVolumeCall<'a, C, A> { self._shelf = new_value.to_string(); self } + /// ID of volume to add. + /// /// Sets the *volume id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of volume to add. pub fn volume_id(mut self, new_value: &str) -> MylibraryBookshelveAddVolumeCall<'a, C, A> { self._volume_id = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveAddVolumeCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *reason* query property to the given value. - /// - /// /// The reason for which the book is added to the library. + /// + /// Sets the *reason* query property to the given value. pub fn reason(mut self, new_value: &str) -> MylibraryBookshelveAddVolumeCall<'a, C, A> { self._reason = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryBookshelveAddVolumeCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12273,8 +12120,8 @@ impl<'a, C, A> MylibraryBookshelveAddVolumeCall<'a, C, A> where C: BorrowMut MylibraryAnnotationInsertCall<'a, C, A> where C: BorrowMut MylibraryAnnotationInsertCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryAnnotationInsertCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *show only summary in response* query property to the given value. - /// - /// /// Requests that only the summary of the specified layer be provided in the response. + /// + /// Sets the *show only summary in response* query property to the given value. pub fn show_only_summary_in_response(mut self, new_value: bool) -> MylibraryAnnotationInsertCall<'a, C, A> { self._show_only_summary_in_response = Some(new_value); self } - /// Sets the *country* query property to the given value. - /// - /// /// ISO-3166-1 code to override the IP-based location. + /// + /// Sets the *country* query property to the given value. pub fn country(mut self, new_value: &str) -> MylibraryAnnotationInsertCall<'a, C, A> { self._country = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryAnnotationInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12531,8 +12374,8 @@ impl<'a, C, A> MylibraryAnnotationInsertCall<'a, C, A> where C: BorrowMut MylibraryBookshelveRemoveVolumeCall<'a, C, A> where C: BorrowMut< } + /// ID of bookshelf from which to remove a volume. + /// /// Sets the *shelf* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of bookshelf from which to remove a volume. pub fn shelf(mut self, new_value: &str) -> MylibraryBookshelveRemoveVolumeCall<'a, C, A> { self._shelf = new_value.to_string(); self } + /// ID of volume to remove. + /// /// Sets the *volume id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of volume to remove. pub fn volume_id(mut self, new_value: &str) -> MylibraryBookshelveRemoveVolumeCall<'a, C, A> { self._volume_id = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveRemoveVolumeCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *reason* query property to the given value. - /// - /// /// The reason for which the book is removed from the library. + /// + /// Sets the *reason* query property to the given value. pub fn reason(mut self, new_value: &str) -> MylibraryBookshelveRemoveVolumeCall<'a, C, A> { self._reason = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryBookshelveRemoveVolumeCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12789,8 +12629,8 @@ impl<'a, C, A> MylibraryBookshelveRemoveVolumeCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13002,94 +12842,83 @@ impl<'a, C, A> MylibraryAnnotationListCall<'a, C, A> where C: BorrowMut MylibraryAnnotationListCall<'a, C, A> { self._volume_id = Some(new_value.to_string()); self } - /// Sets the *updated min* query property to the given value. - /// - /// /// RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). + /// + /// Sets the *updated min* query property to the given value. pub fn updated_min(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, A> { self._updated_min = Some(new_value.to_string()); self } - /// Sets the *updated max* query property to the given value. - /// - /// /// RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). + /// + /// Sets the *updated max* query property to the given value. pub fn updated_max(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, A> { self._updated_max = Some(new_value.to_string()); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *show deleted* query property to the given value. - /// - /// /// Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false. + /// + /// Sets the *show deleted* query property to the given value. pub fn show_deleted(mut self, new_value: bool) -> MylibraryAnnotationListCall<'a, C, A> { self._show_deleted = Some(new_value); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of the nextToken from the previous page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> MylibraryAnnotationListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// The layer ID(s) to limit annotation by. + /// /// Append the given value to the *layer ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The layer ID(s) to limit annotation by. pub fn add_layer_ids(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, A> { self._layer_ids.push(new_value.to_string()); self } - /// Sets the *layer id* query property to the given value. - /// - /// /// The layer ID to limit annotation by. + /// + /// Sets the *layer id* query property to the given value. pub fn layer_id(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, A> { self._layer_id = Some(new_value.to_string()); self } - /// Sets the *content version* query property to the given value. - /// - /// /// The content version for the requested volume. + /// + /// Sets the *content version* query property to the given value. pub fn content_version(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, A> { self._content_version = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryAnnotationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13119,8 +12948,8 @@ impl<'a, C, A> MylibraryAnnotationListCall<'a, C, A> where C: BorrowMut MylibraryAnnotationUpdateCall<'a, C, A> where C: BorrowMut MylibraryAnnotationUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID for the annotation to update. + /// /// Sets the *annotation id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the annotation to update. pub fn annotation_id(mut self, new_value: &str) -> MylibraryAnnotationUpdateCall<'a, C, A> { self._annotation_id = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryAnnotationUpdateCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryAnnotationUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13387,8 +13214,8 @@ impl<'a, C, A> MylibraryAnnotationUpdateCall<'a, C, A> where C: BorrowMut MylibraryReadingpositionSetPositionCall<'a, C, A> where C: Borrow } + /// ID of volume for which to update the reading position. + /// /// Sets the *volume id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of volume for which to update the reading position. pub fn volume_id(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, A> { self._volume_id = new_value.to_string(); self } + /// RFC 3339 UTC format timestamp associated with this reading position. + /// /// Sets the *timestamp* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// RFC 3339 UTC format timestamp associated with this reading position. pub fn timestamp(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, A> { self._timestamp = new_value.to_string(); self } + /// Position string for the new volume reading position. + /// /// Sets the *position* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Position string for the new volume reading position. pub fn position(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, A> { self._position = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *device cookie* query property to the given value. - /// - /// /// Random persistent device cookie optional on set position. + /// + /// Sets the *device cookie* query property to the given value. pub fn device_cookie(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, A> { self._device_cookie = Some(new_value.to_string()); self } - /// Sets the *content version* query property to the given value. - /// - /// /// Volume content version for which this reading position applies. + /// + /// Sets the *content version* query property to the given value. pub fn content_version(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, A> { self._content_version = Some(new_value.to_string()); self } - /// Sets the *action* query property to the given value. - /// - /// /// Action that caused this reading position to be set. + /// + /// Sets the *action* query property to the given value. pub fn action(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, A> { self._action = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryReadingpositionSetPositionCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13683,8 +13505,8 @@ impl<'a, C, A> MylibraryReadingpositionSetPositionCall<'a, C, A> where C: Borrow /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13873,31 +13695,29 @@ impl<'a, C, A> MylibraryBookshelveGetCall<'a, C, A> where C: BorrowMut MylibraryBookshelveGetCall<'a, C, A> { self._shelf = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveGetCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryBookshelveGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13927,8 +13747,8 @@ impl<'a, C, A> MylibraryBookshelveGetCall<'a, C, A> where C: BorrowMut MylibraryBookshelveListCall<'a, C, A> where C: BorrowMut MylibraryBookshelveListCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryBookshelveListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14135,8 +13953,8 @@ impl<'a, C, A> MylibraryBookshelveListCall<'a, C, A> where C: BorrowMut MylibraryReadingpositionGetCall<'a, C, A> where C: BorrowMut MylibraryReadingpositionGetCall<'a, C, A> { self._volume_id = new_value.to_string(); self } - /// Sets the *source* query property to the given value. - /// - /// /// String to identify the originator of this request. + /// + /// Sets the *source* query property to the given value. pub fn source(mut self, new_value: &str) -> MylibraryReadingpositionGetCall<'a, C, A> { self._source = Some(new_value.to_string()); self } - /// Sets the *content version* query property to the given value. - /// - /// /// Volume content version for which this reading position is requested. + /// + /// Sets the *content version* query property to the given value. pub fn content_version(mut self, new_value: &str) -> MylibraryReadingpositionGetCall<'a, C, A> { self._content_version = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MylibraryReadingpositionGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14392,8 +14207,8 @@ impl<'a, C, A> MylibraryReadingpositionGetCall<'a, C, A> where C: BorrowMut CloudloadingAddBookCall<'a, C, A> where C: BorrowMut CloudloadingAddBookCall<'a, C, A> { self._upload_client_token = Some(new_value.to_string()); self } - /// Sets the *name* query property to the given value. - /// - /// /// The document name. It can be set only if the drive_document_id is set. + /// + /// Sets the *name* query property to the given value. pub fn name(mut self, new_value: &str) -> CloudloadingAddBookCall<'a, C, A> { self._name = Some(new_value.to_string()); self } - /// Sets the *mime_type* query property to the given value. - /// - /// /// The document MIME type. It can be set only if the drive_document_id is set. + /// + /// Sets the *mime_type* query property to the given value. pub fn mime_type(mut self, new_value: &str) -> CloudloadingAddBookCall<'a, C, A> { self._mime_type = Some(new_value.to_string()); self } - /// Sets the *drive_document_id* query property to the given value. - /// - /// /// A drive document id. The upload_client_token must not be set. + /// + /// Sets the *drive_document_id* query property to the given value. pub fn drive_document_id(mut self, new_value: &str) -> CloudloadingAddBookCall<'a, C, A> { self._drive_document_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CloudloadingAddBookCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14638,8 +14448,8 @@ impl<'a, C, A> CloudloadingAddBookCall<'a, C, A> where C: BorrowMut CloudloadingUpdateBookCall<'a, C, A> where C: BorrowMut CloudloadingUpdateBookCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CloudloadingUpdateBookCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14857,8 +14666,8 @@ impl<'a, C, A> CloudloadingUpdateBookCall<'a, C, A> where C: BorrowMut CloudloadingDeleteBookCall<'a, C, A> where C: BorrowMut CloudloadingDeleteBookCall<'a, C, A> { self._volume_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CloudloadingDeleteBookCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15053,8 +14861,8 @@ impl<'a, C, A> CloudloadingDeleteBookCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/calendar3/src/cmn.rs b/gen/calendar3/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/calendar3/src/cmn.rs +++ b/gen/calendar3/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/calendar3/src/lib.rs b/gen/calendar3/src/lib.rs index 528a027030..1ceb702dce 100644 --- a/gen/calendar3/src/lib.rs +++ b/gen/calendar3/src/lib.rs @@ -157,16 +157,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -351,16 +353,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -459,7 +463,7 @@ impl Part for EventGadget {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FreeBusyCalendar { /// List of time ranges during which this calendar should be regarded as busy. pub busy: Vec, @@ -500,7 +504,7 @@ impl Part for AclRuleScope {} /// /// * [list settings](struct.SettingListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Settings { /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. #[serde(rename="nextPageToken")] @@ -643,7 +647,7 @@ impl Part for CalendarListEntryNotificationSettings {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ColorDefinition { /// The foreground color that can be used to write on top of a background with 'background' color. pub foreground: String, @@ -684,7 +688,7 @@ impl Part for EventDateTime {} /// * [watch settings](struct.SettingWatchCall.html) (none) /// * [get settings](struct.SettingGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Setting { /// Type of the resource ("calendar#setting"). pub kind: String, @@ -726,7 +730,7 @@ impl Part for EventCreator {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ErrorType { /// Domain, or broad category, of the error. pub domain: String, @@ -785,7 +789,7 @@ impl ResponseResult for AclRule {} /// /// * [list acl](struct.AclListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Acl { /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. #[serde(rename="nextPageToken")] @@ -814,7 +818,7 @@ impl ResponseResult for Acl {} /// * [instances events](struct.EventInstanceCall.html) (response) /// * [list events](struct.EventListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Events { /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. #[serde(rename="nextPageToken")] @@ -941,7 +945,7 @@ impl Part for EventAttendee {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FreeBusyGroup { /// Optional error(s) (if computation for the group failed). pub errors: Vec, @@ -978,7 +982,7 @@ impl Part for EventReminders {} /// /// * [list calendar list](struct.CalendarListListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CalendarList { /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. #[serde(rename="nextPageToken")] @@ -1035,7 +1039,7 @@ impl Part for FreeBusyRequestItem {} /// /// * [query freebusy](struct.FreebusyQueryCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FreeBusyResponse { /// The end of the interval. #[serde(rename="timeMax")] @@ -1063,7 +1067,7 @@ impl ResponseResult for FreeBusyResponse {} /// /// * [get colors](struct.ColorGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Colors { /// Palette of calendar colors, mapping from the color ID to its definition. A calendarListEntry resource refers to one of these color IDs in its color field. Read-only. pub calendar: HashMap, @@ -1171,7 +1175,7 @@ impl Part for EventReminder {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TimePeriod { /// The (inclusive) start of the time period. pub start: String, @@ -2577,22 +2581,21 @@ impl<'a, C, A> FreebusyQueryCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &FreeBusyRequest) -> FreebusyQueryCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FreebusyQueryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2622,8 +2625,8 @@ impl<'a, C, A> FreebusyQueryCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2796,40 +2799,36 @@ impl<'a, C, A> SettingListCall<'a, C, A> where C: BorrowMut, A: o } - /// Sets the *sync token* query property to the given value. - /// - /// /// Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. /// If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. /// Learn more about incremental synchronization. /// Optional. The default is to return all entries. + /// + /// Sets the *sync token* query property to the given value. pub fn sync_token(mut self, new_value: &str) -> SettingListCall<'a, C, A> { self._sync_token = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token specifying which result page to return. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> SettingListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> SettingListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SettingListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2859,8 +2858,8 @@ impl<'a, C, A> SettingListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3048,49 +3047,45 @@ impl<'a, C, A> SettingWatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> SettingWatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *sync token* query property to the given value. - /// - /// /// Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. /// If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. /// Learn more about incremental synchronization. /// Optional. The default is to return all entries. + /// + /// Sets the *sync token* query property to the given value. pub fn sync_token(mut self, new_value: &str) -> SettingWatchCall<'a, C, A> { self._sync_token = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token specifying which result page to return. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> SettingWatchCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> SettingWatchCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SettingWatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3120,8 +3115,8 @@ impl<'a, C, A> SettingWatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3305,23 +3300,22 @@ impl<'a, C, A> SettingGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The id of the user setting. + /// /// Sets the *setting* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The id of the user setting. pub fn setting(mut self, new_value: &str) -> SettingGetCall<'a, C, A> { self._setting = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SettingGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3351,8 +3345,8 @@ impl<'a, C, A> SettingGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3556,40 +3550,38 @@ impl<'a, C, A> CalendarListUpdateCall<'a, C, A> where C: BorrowMut CalendarListUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarListUpdateCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *color rgb format* query property to the given value. - /// - /// /// Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False. + /// + /// Sets the *color rgb format* query property to the given value. pub fn color_rgb_format(mut self, new_value: bool) -> CalendarListUpdateCall<'a, C, A> { self._color_rgb_format = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarListUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3619,8 +3611,8 @@ impl<'a, C, A> CalendarListUpdateCall<'a, C, A> where C: BorrowMut CalendarListDeleteCall<'a, C, A> where C: BorrowMut CalendarListDeleteCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarListDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3839,8 +3830,8 @@ impl<'a, C, A> CalendarListDeleteCall<'a, C, A> where C: BorrowMut CalendarListGetCall<'a, C, A> where C: BorrowMut, } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarListGetCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarListGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4070,8 +4060,8 @@ impl<'a, C, A> CalendarListGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4259,65 +4249,58 @@ impl<'a, C, A> CalendarListListCall<'a, C, A> where C: BorrowMut, } - /// Sets the *sync token* query property to the given value. - /// - /// /// Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. If only read-only fields such as calendar properties or ACLs have changed, the entry won't be returned. All entries deleted and hidden since the previous list request will always be in the result set and it is not allowed to set showDeleted neither showHidden to False. /// To ensure client state consistency minAccessRole query parameter cannot be specified together with nextSyncToken. /// If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. /// Learn more about incremental synchronization. /// Optional. The default is to return all entries. + /// + /// Sets the *sync token* query property to the given value. pub fn sync_token(mut self, new_value: &str) -> CalendarListListCall<'a, C, A> { self._sync_token = Some(new_value.to_string()); self } - /// Sets the *show hidden* query property to the given value. - /// - /// /// Whether to show hidden entries. Optional. The default is False. + /// + /// Sets the *show hidden* query property to the given value. pub fn show_hidden(mut self, new_value: bool) -> CalendarListListCall<'a, C, A> { self._show_hidden = Some(new_value); self } - /// Sets the *show deleted* query property to the given value. - /// - /// /// Whether to include deleted calendar list entries in the result. Optional. The default is False. + /// + /// Sets the *show deleted* query property to the given value. pub fn show_deleted(mut self, new_value: bool) -> CalendarListListCall<'a, C, A> { self._show_deleted = Some(new_value); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token specifying which result page to return. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CalendarListListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *min access role* query property to the given value. - /// - /// /// The minimum access role for the user in the returned entires. Optional. The default is no restriction. + /// + /// Sets the *min access role* query property to the given value. pub fn min_access_role(mut self, new_value: &str) -> CalendarListListCall<'a, C, A> { self._min_access_role = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> CalendarListListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarListListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4347,8 +4330,8 @@ impl<'a, C, A> CalendarListListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4526,30 +4509,28 @@ impl<'a, C, A> CalendarListInsertCall<'a, C, A> where C: BorrowMut CalendarListInsertCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *color rgb format* query property to the given value. - /// - /// /// Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False. + /// + /// Sets the *color rgb format* query property to the given value. pub fn color_rgb_format(mut self, new_value: bool) -> CalendarListInsertCall<'a, C, A> { self._color_rgb_format = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarListInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4579,8 +4560,8 @@ impl<'a, C, A> CalendarListInsertCall<'a, C, A> where C: BorrowMut CalendarListPatchCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &CalendarListEntry) -> CalendarListPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarListPatchCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *color rgb format* query property to the given value. - /// - /// /// Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False. + /// + /// Sets the *color rgb format* query property to the given value. pub fn color_rgb_format(mut self, new_value: bool) -> CalendarListPatchCall<'a, C, A> { self._color_rgb_format = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarListPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4847,8 +4826,8 @@ impl<'a, C, A> CalendarListPatchCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5051,74 +5030,67 @@ impl<'a, C, A> CalendarListWatchCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> CalendarListWatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *sync token* query property to the given value. - /// - /// /// Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. If only read-only fields such as calendar properties or ACLs have changed, the entry won't be returned. All entries deleted and hidden since the previous list request will always be in the result set and it is not allowed to set showDeleted neither showHidden to False. /// To ensure client state consistency minAccessRole query parameter cannot be specified together with nextSyncToken. /// If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. /// Learn more about incremental synchronization. /// Optional. The default is to return all entries. + /// + /// Sets the *sync token* query property to the given value. pub fn sync_token(mut self, new_value: &str) -> CalendarListWatchCall<'a, C, A> { self._sync_token = Some(new_value.to_string()); self } - /// Sets the *show hidden* query property to the given value. - /// - /// /// Whether to show hidden entries. Optional. The default is False. + /// + /// Sets the *show hidden* query property to the given value. pub fn show_hidden(mut self, new_value: bool) -> CalendarListWatchCall<'a, C, A> { self._show_hidden = Some(new_value); self } - /// Sets the *show deleted* query property to the given value. - /// - /// /// Whether to include deleted calendar list entries in the result. Optional. The default is False. + /// + /// Sets the *show deleted* query property to the given value. pub fn show_deleted(mut self, new_value: bool) -> CalendarListWatchCall<'a, C, A> { self._show_deleted = Some(new_value); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token specifying which result page to return. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CalendarListWatchCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *min access role* query property to the given value. - /// - /// /// The minimum access role for the user in the returned entires. Optional. The default is no restriction. + /// + /// Sets the *min access role* query property to the given value. pub fn min_access_role(mut self, new_value: &str) -> CalendarListWatchCall<'a, C, A> { self._min_access_role = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> CalendarListWatchCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarListWatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5148,8 +5120,8 @@ impl<'a, C, A> CalendarListWatchCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5348,32 +5320,31 @@ impl<'a, C, A> CalendarPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Calendar) -> CalendarPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarPatchCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5403,8 +5374,8 @@ impl<'a, C, A> CalendarPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5577,23 +5548,22 @@ impl<'a, C, A> CalendarDeleteCall<'a, C, A> where C: BorrowMut, A } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarDeleteCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5623,8 +5593,8 @@ impl<'a, C, A> CalendarDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5808,23 +5778,22 @@ impl<'a, C, A> CalendarGetCall<'a, C, A> where C: BorrowMut, A: o } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarGetCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5854,8 +5823,8 @@ impl<'a, C, A> CalendarGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6028,23 +5997,22 @@ impl<'a, C, A> CalendarClearCall<'a, C, A> where C: BorrowMut, A: } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarClearCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarClearCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6074,8 +6042,8 @@ impl<'a, C, A> CalendarClearCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6248,22 +6216,21 @@ impl<'a, C, A> CalendarInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Calendar) -> CalendarInsertCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6293,8 +6260,8 @@ impl<'a, C, A> CalendarInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6493,32 +6460,31 @@ impl<'a, C, A> CalendarUpdateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Calendar) -> CalendarUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarUpdateCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CalendarUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6548,8 +6514,8 @@ impl<'a, C, A> CalendarUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6768,67 +6734,62 @@ impl<'a, C, A> AclWatchCall<'a, C, A> where C: BorrowMut, A: oaut } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> AclWatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclWatchCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *sync token* query property to the given value. - /// - /// /// Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All entries deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False. /// If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. /// Learn more about incremental synchronization. /// Optional. The default is to return all entries. + /// + /// Sets the *sync token* query property to the given value. pub fn sync_token(mut self, new_value: &str) -> AclWatchCall<'a, C, A> { self._sync_token = Some(new_value.to_string()); self } - /// Sets the *show deleted* query property to the given value. - /// - /// /// Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False. + /// + /// Sets the *show deleted* query property to the given value. pub fn show_deleted(mut self, new_value: bool) -> AclWatchCall<'a, C, A> { self._show_deleted = Some(new_value); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token specifying which result page to return. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AclWatchCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AclWatchCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AclWatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6858,8 +6819,8 @@ impl<'a, C, A> AclWatchCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7058,32 +7019,31 @@ impl<'a, C, A> AclInsertCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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: &AclRule) -> AclInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclInsertCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AclInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7113,8 +7073,8 @@ impl<'a, C, A> AclInsertCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7315,42 +7275,41 @@ impl<'a, C, A> AclUpdateCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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: &AclRule) -> AclUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclUpdateCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } + /// ACL rule identifier. + /// /// Sets the *rule id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ACL rule identifier. pub fn rule_id(mut self, new_value: &str) -> AclUpdateCall<'a, C, A> { self._rule_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AclUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7380,8 +7339,8 @@ impl<'a, C, A> AclUpdateCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7582,42 +7541,41 @@ impl<'a, C, A> AclPatchCall<'a, C, A> where C: BorrowMut, A: oaut } + /// /// Sets the *request* property to the given value. /// /// 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: &AclRule) -> AclPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclPatchCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } + /// ACL rule identifier. + /// /// Sets the *rule id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ACL rule identifier. pub fn rule_id(mut self, new_value: &str) -> AclPatchCall<'a, C, A> { self._rule_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AclPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7647,8 +7605,8 @@ impl<'a, C, A> AclPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7756,7 +7714,7 @@ impl<'a, C, A> AclListCall<'a, C, A> where C: BorrowMut, A: oauth let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/acl".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{calendarId}", "calendarId")].iter() { @@ -7852,58 +7810,53 @@ impl<'a, C, A> AclListCall<'a, C, A> where C: BorrowMut, A: oauth } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclListCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *sync token* query property to the given value. - /// - /// /// Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All entries deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False. /// If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. /// Learn more about incremental synchronization. /// Optional. The default is to return all entries. + /// + /// Sets the *sync token* query property to the given value. pub fn sync_token(mut self, new_value: &str) -> AclListCall<'a, C, A> { self._sync_token = Some(new_value.to_string()); self } - /// Sets the *show deleted* query property to the given value. - /// - /// /// Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False. + /// + /// Sets the *show deleted* query property to the given value. pub fn show_deleted(mut self, new_value: bool) -> AclListCall<'a, C, A> { self._show_deleted = Some(new_value); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token specifying which result page to return. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AclListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AclListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AclListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7933,8 +7886,8 @@ impl<'a, C, A> AclListCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8109,33 +8062,32 @@ impl<'a, C, A> AclDeleteCall<'a, C, A> where C: BorrowMut, A: oau } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclDeleteCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } + /// ACL rule identifier. + /// /// Sets the *rule id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ACL rule identifier. pub fn rule_id(mut self, new_value: &str) -> AclDeleteCall<'a, C, A> { self._rule_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AclDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8165,8 +8117,8 @@ impl<'a, C, A> AclDeleteCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8352,33 +8304,32 @@ impl<'a, C, A> AclGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclGetCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } + /// ACL rule identifier. + /// /// Sets the *rule id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ACL rule identifier. pub fn rule_id(mut self, new_value: &str) -> AclGetCall<'a, C, A> { self._rule_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AclGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8408,8 +8359,8 @@ impl<'a, C, A> AclGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8571,22 +8522,21 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> ChannelStopCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChannelStopCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8616,8 +8566,8 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8775,13 +8725,12 @@ impl<'a, C, A> ColorGetCall<'a, C, A> where C: BorrowMut, A: oaut } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ColorGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8811,8 +8760,8 @@ impl<'a, C, A> ColorGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8992,41 +8941,39 @@ impl<'a, C, A> EventDeleteCall<'a, C, A> where C: BorrowMut, A: o } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventDeleteCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } + /// Event identifier. + /// /// Sets the *event id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Event identifier. pub fn event_id(mut self, new_value: &str) -> EventDeleteCall<'a, C, A> { self._event_id = new_value.to_string(); self } - /// Sets the *send notifications* query property to the given value. - /// - /// /// Whether to send notifications about the deletion of the event. Optional. The default is False. + /// + /// Sets the *send notifications* query property to the given value. pub fn send_notifications(mut self, new_value: bool) -> EventDeleteCall<'a, C, A> { self._send_notifications = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9056,8 +9003,8 @@ impl<'a, C, A> EventDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9266,48 +9213,45 @@ impl<'a, C, A> EventInsertCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Event) -> EventInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventInsertCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *send notifications* query property to the given value. - /// - /// /// Whether to send notifications about the creation of the new event. Optional. The default is False. + /// + /// Sets the *send notifications* query property to the given value. pub fn send_notifications(mut self, new_value: bool) -> EventInsertCall<'a, C, A> { self._send_notifications = Some(new_value); self } - /// Sets the *max attendees* query property to the given value. - /// - /// /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// + /// Sets the *max attendees* query property to the given value. pub fn max_attendees(mut self, new_value: i32) -> EventInsertCall<'a, C, A> { self._max_attendees = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9337,8 +9281,8 @@ impl<'a, C, A> EventInsertCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9537,32 +9481,31 @@ impl<'a, C, A> EventImportCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Event) -> EventImportCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventImportCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventImportCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9592,8 +9535,8 @@ impl<'a, C, A> EventImportCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9824,105 +9767,95 @@ impl<'a, C, A> EventInstanceCall<'a, C, A> where C: BorrowMut, A: } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventInstanceCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } + /// Recurring event identifier. + /// /// Sets the *event id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Recurring event identifier. pub fn event_id(mut self, new_value: &str) -> EventInstanceCall<'a, C, A> { self._event_id = new_value.to_string(); self } - /// Sets the *time zone* query property to the given value. - /// - /// /// Time zone used in the response. Optional. The default is the time zone of the calendar. + /// + /// Sets the *time zone* query property to the given value. pub fn time_zone(mut self, new_value: &str) -> EventInstanceCall<'a, C, A> { self._time_zone = Some(new_value.to_string()); self } - /// Sets the *time min* query property to the given value. - /// - /// /// Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. + /// + /// Sets the *time min* query property to the given value. pub fn time_min(mut self, new_value: &str) -> EventInstanceCall<'a, C, A> { self._time_min = Some(new_value.to_string()); self } - /// Sets the *time max* query property to the given value. - /// - /// /// Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. + /// + /// Sets the *time max* query property to the given value. pub fn time_max(mut self, new_value: &str) -> EventInstanceCall<'a, C, A> { self._time_max = Some(new_value.to_string()); self } - /// Sets the *show deleted* query property to the given value. - /// - /// /// Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events will still be included if singleEvents is False. Optional. The default is False. + /// + /// Sets the *show deleted* query property to the given value. pub fn show_deleted(mut self, new_value: bool) -> EventInstanceCall<'a, C, A> { self._show_deleted = Some(new_value); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token specifying which result page to return. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> EventInstanceCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *original start* query property to the given value. - /// - /// /// The original start time of the instance in the result. Optional. + /// + /// Sets the *original start* query property to the given value. pub fn original_start(mut self, new_value: &str) -> EventInstanceCall<'a, C, A> { self._original_start = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> EventInstanceCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *max attendees* query property to the given value. - /// - /// /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// + /// Sets the *max attendees* query property to the given value. pub fn max_attendees(mut self, new_value: i32) -> EventInstanceCall<'a, C, A> { self._max_attendees = Some(new_value); self } - /// Sets the *always include email* query property to the given value. - /// - /// /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// + /// Sets the *always include email* query property to the given value. pub fn always_include_email(mut self, new_value: bool) -> EventInstanceCall<'a, C, A> { self._always_include_email = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventInstanceCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9952,8 +9885,8 @@ impl<'a, C, A> EventInstanceCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10154,57 +10087,53 @@ impl<'a, C, A> EventGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventGetCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } + /// Event identifier. + /// /// Sets the *event id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Event identifier. pub fn event_id(mut self, new_value: &str) -> EventGetCall<'a, C, A> { self._event_id = new_value.to_string(); self } - /// Sets the *time zone* query property to the given value. - /// - /// /// Time zone used in the response. Optional. The default is the time zone of the calendar. + /// + /// Sets the *time zone* query property to the given value. pub fn time_zone(mut self, new_value: &str) -> EventGetCall<'a, C, A> { self._time_zone = Some(new_value.to_string()); self } - /// Sets the *max attendees* query property to the given value. - /// - /// /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// + /// Sets the *max attendees* query property to the given value. pub fn max_attendees(mut self, new_value: i32) -> EventGetCall<'a, C, A> { self._max_attendees = Some(new_value); self } - /// Sets the *always include email* query property to the given value. - /// - /// /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// + /// Sets the *always include email* query property to the given value. pub fn always_include_email(mut self, new_value: bool) -> EventGetCall<'a, C, A> { self._always_include_email = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10234,8 +10163,8 @@ impl<'a, C, A> EventGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10512,51 +10441,44 @@ impl<'a, C, A> EventListCall<'a, C, A> where C: BorrowMut, A: oau } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *updated min* query property to the given value. - /// - /// /// Lower bound for an event's last modification time (as a RFC 3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted. Optional. The default is not to filter by last modification time. + /// + /// Sets the *updated min* query property to the given value. pub fn updated_min(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._updated_min = Some(new_value.to_string()); self } - /// Sets the *time zone* query property to the given value. - /// - /// /// Time zone used in the response. Optional. The default is the time zone of the calendar. + /// + /// Sets the *time zone* query property to the given value. pub fn time_zone(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._time_zone = Some(new_value.to_string()); self } - /// Sets the *time min* query property to the given value. - /// - /// /// Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. + /// + /// Sets the *time min* query property to the given value. pub fn time_min(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._time_min = Some(new_value.to_string()); self } - /// Sets the *time max* query property to the given value. - /// - /// /// Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. + /// + /// Sets the *time max* query property to the given value. pub fn time_max(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._time_max = Some(new_value.to_string()); self } - /// Sets the *sync token* query property to the given value. - /// - /// /// Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False. /// There are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state. /// @@ -10571,115 +10493,104 @@ impl<'a, C, A> EventListCall<'a, C, A> where C: BorrowMut, A: oau /// - updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. /// Learn more about incremental synchronization. /// Optional. The default is to return all entries. + /// + /// Sets the *sync token* query property to the given value. pub fn sync_token(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._sync_token = Some(new_value.to_string()); self } - /// Sets the *single events* query property to the given value. - /// - /// /// Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False. + /// + /// Sets the *single events* query property to the given value. pub fn single_events(mut self, new_value: bool) -> EventListCall<'a, C, A> { self._single_events = Some(new_value); self } - /// Sets the *show hidden invitations* query property to the given value. - /// - /// /// Whether to include hidden invitations in the result. Optional. The default is False. + /// + /// Sets the *show hidden invitations* query property to the given value. pub fn show_hidden_invitations(mut self, new_value: bool) -> EventListCall<'a, C, A> { self._show_hidden_invitations = Some(new_value); self } - /// Sets the *show deleted* query property to the given value. - /// - /// /// Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False. + /// + /// Sets the *show deleted* query property to the given value. pub fn show_deleted(mut self, new_value: bool) -> EventListCall<'a, C, A> { self._show_deleted = Some(new_value); self } + /// Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. + /// /// Append the given value to the *shared extended property* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. pub fn add_shared_extended_property(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._shared_extended_property.push(new_value.to_string()); self } - /// Sets the *q* query property to the given value. - /// - /// /// Free text search terms to find events that match these terms in any field, except for extended properties. Optional. + /// + /// Sets the *q* query property to the given value. pub fn q(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._q = Some(new_value.to_string()); self } + /// Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. + /// /// Append the given value to the *private extended property* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. pub fn add_private_extended_property(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._private_extended_property.push(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token specifying which result page to return. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *order by* query property to the given value. - /// - /// /// The order of the events returned in the result. Optional. The default is an unspecified, stable order. + /// + /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> EventListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *max attendees* query property to the given value. - /// - /// /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// + /// Sets the *max attendees* query property to the given value. pub fn max_attendees(mut self, new_value: i32) -> EventListCall<'a, C, A> { self._max_attendees = Some(new_value); self } - /// Sets the *i cal uid* query property to the given value. - /// - /// /// Specifies event ID in the iCalendar format to be included in the response. Optional. + /// + /// Sets the *i cal uid* query property to the given value. pub fn i_cal_uid(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._i_cal_uid = Some(new_value.to_string()); self } - /// Sets the *always include email* query property to the given value. - /// - /// /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// + /// Sets the *always include email* query property to the given value. pub fn always_include_email(mut self, new_value: bool) -> EventListCall<'a, C, A> { self._always_include_email = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10709,8 +10620,8 @@ impl<'a, C, A> EventListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10926,66 +10837,62 @@ impl<'a, C, A> EventPatchCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Event) -> EventPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventPatchCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } + /// Event identifier. + /// /// Sets the *event id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Event identifier. pub fn event_id(mut self, new_value: &str) -> EventPatchCall<'a, C, A> { self._event_id = new_value.to_string(); self } - /// Sets the *send notifications* query property to the given value. - /// - /// /// Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False. + /// + /// Sets the *send notifications* query property to the given value. pub fn send_notifications(mut self, new_value: bool) -> EventPatchCall<'a, C, A> { self._send_notifications = Some(new_value); self } - /// Sets the *max attendees* query property to the given value. - /// - /// /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// + /// Sets the *max attendees* query property to the given value. pub fn max_attendees(mut self, new_value: i32) -> EventPatchCall<'a, C, A> { self._max_attendees = Some(new_value); self } - /// Sets the *always include email* query property to the given value. - /// - /// /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// + /// Sets the *always include email* query property to the given value. pub fn always_include_email(mut self, new_value: bool) -> EventPatchCall<'a, C, A> { self._always_include_email = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11015,8 +10922,8 @@ impl<'a, C, A> EventPatchCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11209,51 +11116,49 @@ impl<'a, C, A> EventMoveCall<'a, C, A> where C: BorrowMut, A: oau } + /// Calendar identifier of the source calendar where the event currently is on. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier of the source calendar where the event currently is on. pub fn calendar_id(mut self, new_value: &str) -> EventMoveCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } + /// Event identifier. + /// /// Sets the *event id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Event identifier. pub fn event_id(mut self, new_value: &str) -> EventMoveCall<'a, C, A> { self._event_id = new_value.to_string(); self } + /// Calendar identifier of the target calendar where the event is to be moved to. + /// /// Sets the *destination* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier of the target calendar where the event is to be moved to. pub fn destination(mut self, new_value: &str) -> EventMoveCall<'a, C, A> { self._destination = new_value.to_string(); self } - /// Sets the *send notifications* query property to the given value. - /// - /// /// Whether to send notifications about the change of the event's organizer. Optional. The default is False. + /// + /// Sets the *send notifications* query property to the given value. pub fn send_notifications(mut self, new_value: bool) -> EventMoveCall<'a, C, A> { self._send_notifications = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventMoveCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11283,8 +11188,8 @@ impl<'a, C, A> EventMoveCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11500,66 +11405,62 @@ impl<'a, C, A> EventUpdateCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Event) -> EventUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventUpdateCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } + /// Event identifier. + /// /// Sets the *event id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Event identifier. pub fn event_id(mut self, new_value: &str) -> EventUpdateCall<'a, C, A> { self._event_id = new_value.to_string(); self } - /// Sets the *send notifications* query property to the given value. - /// - /// /// Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False. + /// + /// Sets the *send notifications* query property to the given value. pub fn send_notifications(mut self, new_value: bool) -> EventUpdateCall<'a, C, A> { self._send_notifications = Some(new_value); self } - /// Sets the *max attendees* query property to the given value. - /// - /// /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// + /// Sets the *max attendees* query property to the given value. pub fn max_attendees(mut self, new_value: i32) -> EventUpdateCall<'a, C, A> { self._max_attendees = Some(new_value); self } - /// Sets the *always include email* query property to the given value. - /// - /// /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// + /// Sets the *always include email* query property to the given value. pub fn always_include_email(mut self, new_value: bool) -> EventUpdateCall<'a, C, A> { self._always_include_email = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11589,8 +11490,8 @@ impl<'a, C, A> EventUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11882,60 +11783,53 @@ impl<'a, C, A> EventWatchCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> EventWatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } - /// Sets the *updated min* query property to the given value. - /// - /// /// Lower bound for an event's last modification time (as a RFC 3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted. Optional. The default is not to filter by last modification time. + /// + /// Sets the *updated min* query property to the given value. pub fn updated_min(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._updated_min = Some(new_value.to_string()); self } - /// Sets the *time zone* query property to the given value. - /// - /// /// Time zone used in the response. Optional. The default is the time zone of the calendar. + /// + /// Sets the *time zone* query property to the given value. pub fn time_zone(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._time_zone = Some(new_value.to_string()); self } - /// Sets the *time min* query property to the given value. - /// - /// /// Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. + /// + /// Sets the *time min* query property to the given value. pub fn time_min(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._time_min = Some(new_value.to_string()); self } - /// Sets the *time max* query property to the given value. - /// - /// /// Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. + /// + /// Sets the *time max* query property to the given value. pub fn time_max(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._time_max = Some(new_value.to_string()); self } - /// Sets the *sync token* query property to the given value. - /// - /// /// Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False. /// There are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state. /// @@ -11950,115 +11844,104 @@ impl<'a, C, A> EventWatchCall<'a, C, A> where C: BorrowMut, A: oa /// - updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. /// Learn more about incremental synchronization. /// Optional. The default is to return all entries. + /// + /// Sets the *sync token* query property to the given value. pub fn sync_token(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._sync_token = Some(new_value.to_string()); self } - /// Sets the *single events* query property to the given value. - /// - /// /// Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False. + /// + /// Sets the *single events* query property to the given value. pub fn single_events(mut self, new_value: bool) -> EventWatchCall<'a, C, A> { self._single_events = Some(new_value); self } - /// Sets the *show hidden invitations* query property to the given value. - /// - /// /// Whether to include hidden invitations in the result. Optional. The default is False. + /// + /// Sets the *show hidden invitations* query property to the given value. pub fn show_hidden_invitations(mut self, new_value: bool) -> EventWatchCall<'a, C, A> { self._show_hidden_invitations = Some(new_value); self } - /// Sets the *show deleted* query property to the given value. - /// - /// /// Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False. + /// + /// Sets the *show deleted* query property to the given value. pub fn show_deleted(mut self, new_value: bool) -> EventWatchCall<'a, C, A> { self._show_deleted = Some(new_value); self } + /// Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. + /// /// Append the given value to the *shared extended property* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. pub fn add_shared_extended_property(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._shared_extended_property.push(new_value.to_string()); self } - /// Sets the *q* query property to the given value. - /// - /// /// Free text search terms to find events that match these terms in any field, except for extended properties. Optional. + /// + /// Sets the *q* query property to the given value. pub fn q(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._q = Some(new_value.to_string()); self } + /// Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. + /// /// Append the given value to the *private extended property* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. pub fn add_private_extended_property(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._private_extended_property.push(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Token specifying which result page to return. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *order by* query property to the given value. - /// - /// /// The order of the events returned in the result. Optional. The default is an unspecified, stable order. + /// + /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> EventWatchCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *max attendees* query property to the given value. - /// - /// /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// + /// Sets the *max attendees* query property to the given value. pub fn max_attendees(mut self, new_value: i32) -> EventWatchCall<'a, C, A> { self._max_attendees = Some(new_value); self } - /// Sets the *i cal uid* query property to the given value. - /// - /// /// Specifies event ID in the iCalendar format to be included in the response. Optional. + /// + /// Sets the *i cal uid* query property to the given value. pub fn i_cal_uid(mut self, new_value: &str) -> EventWatchCall<'a, C, A> { self._i_cal_uid = Some(new_value.to_string()); self } - /// Sets the *always include email* query property to the given value. - /// - /// /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// + /// Sets the *always include email* query property to the given value. pub fn always_include_email(mut self, new_value: bool) -> EventWatchCall<'a, C, A> { self._always_include_email = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventWatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12088,8 +11971,8 @@ impl<'a, C, A> EventWatchCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12280,41 +12163,39 @@ impl<'a, C, A> EventQuickAddCall<'a, C, A> where C: BorrowMut, A: } + /// Calendar identifier. + /// /// Sets the *calendar id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventQuickAddCall<'a, C, A> { self._calendar_id = new_value.to_string(); self } + /// The text describing the event to be created. + /// /// Sets the *text* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The text describing the event to be created. pub fn text(mut self, new_value: &str) -> EventQuickAddCall<'a, C, A> { self._text = new_value.to_string(); self } - /// Sets the *send notifications* query property to the given value. - /// - /// /// Whether to send notifications about the creation of the event. Optional. The default is False. + /// + /// Sets the *send notifications* query property to the given value. pub fn send_notifications(mut self, new_value: bool) -> EventQuickAddCall<'a, C, A> { self._send_notifications = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventQuickAddCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12344,8 +12225,8 @@ impl<'a, C, A> EventQuickAddCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/civicinfo2/README.md b/gen/civicinfo2/README.md index 90baadb1fa..f219e54072 100644 --- a/gen/civicinfo2/README.md +++ b/gen/civicinfo2/README.md @@ -104,16 +104,18 @@ let result = hub.elections().voter_info_query("address") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/civicinfo2/src/cmn.rs b/gen/civicinfo2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/civicinfo2/src/cmn.rs +++ b/gen/civicinfo2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/civicinfo2/src/lib.rs b/gen/civicinfo2/src/lib.rs index 6202bb4d67..9a4cd3b286 100644 --- a/gen/civicinfo2/src/lib.rs +++ b/gen/civicinfo2/src/lib.rs @@ -105,16 +105,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -252,16 +254,18 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -313,7 +317,7 @@ impl<'a, C, A> CivicInfo /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdministrationRegion { /// The election administration body for this area. #[serde(rename="electionAdministrationBody")] @@ -335,7 +339,7 @@ impl Part for AdministrationRegion {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Official { /// The official's name. pub name: String, @@ -363,7 +367,7 @@ impl Part for Official {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ElectoralDistrict { /// The geographic scope of this district. If unspecified the district's geography is not known. One of: national, statewide, congressional, stateUpper, stateLower, countywide, judicial, schoolBoard, cityWide, township, countyCouncil, cityCouncil, ward, special pub scope: String, @@ -385,7 +389,7 @@ impl Part for ElectoralDistrict {} /// /// * [search divisions](struct.DivisionSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DivisionSearchResponse { /// Identifies what kind of resource this is. Value: the fixed string "civicinfo#divisionSearchResponse". pub kind: String, @@ -400,7 +404,7 @@ impl ResponseResult for DivisionSearchResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Candidate { /// The candidate's name. pub name: String, @@ -430,7 +434,7 @@ impl Part for Candidate {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Contest { /// The name of the office for this contest. pub office: String, @@ -489,7 +493,7 @@ impl Part for Contest {} /// /// * [election query elections](struct.ElectionElectionQueryCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ElectionsQueryResponse { /// Identifies what kind of resource this is. Value: the fixed string "civicinfo#electionsQueryResponse". pub kind: String, @@ -509,7 +513,7 @@ impl ResponseResult for ElectionsQueryResponse {} /// /// * [representative info by address representatives](struct.RepresentativeRepresentativeInfoByAddresCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RepresentativeInfoResponse { /// Political geographic divisions that contain the requested address. pub divisions: HashMap, @@ -531,7 +535,7 @@ impl ResponseResult for RepresentativeInfoResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Source { /// Whether this data comes from an official government source. pub official: bool, @@ -546,7 +550,7 @@ impl Part for Source {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ElectionOfficial { /// The fax number of the election official. #[serde(rename="faxNumber")] @@ -570,7 +574,7 @@ impl Part for ElectionOfficial {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdministrativeBody { /// A URL provided by this administrative body for information on absentee voting. #[serde(rename="absenteeVotingInfoUrl")] @@ -618,7 +622,7 @@ impl Part for AdministrativeBody {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Channel { /// The type of channel. The following is a list of types of channels, but is not exhaustive. More channel types may be added at a later time. One of: GooglePlus, YouTube, Facebook, Twitter #[serde(rename="type")] @@ -634,7 +638,7 @@ impl Part for Channel {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Office { /// A list of sources for this office. If multiple sources are listed, the data has been aggregated from those sources. pub sources: Vec, @@ -659,7 +663,7 @@ impl Part for Office {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DivisionSearchResult { /// The unique Open Civic Data identifier for this division. #[serde(rename="ocdId")] @@ -677,7 +681,7 @@ impl Part for DivisionSearchResult {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SimpleAddressType { /// The name of the location. #[serde(rename="locationName")] @@ -703,7 +707,7 @@ impl Part for SimpleAddressType {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GeographicDivision { /// List of indices in the offices array, one for each office elected from this division. Will only be present if includeOffices was true (or absent) in the request. #[serde(rename="officeIndices")] @@ -726,7 +730,7 @@ impl Part for GeographicDivision {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PollingLocation { /// The first date that this early vote site or drop off location may be used. This field is not populated for polling locations. #[serde(rename="startDate")] @@ -764,7 +768,7 @@ impl Part for PollingLocation {} /// /// * [representative info by division representatives](struct.RepresentativeRepresentativeInfoByDivisionCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RepresentativeInfoData { /// Political geographic divisions that contain the requested address. pub divisions: HashMap, @@ -786,7 +790,7 @@ impl ResponseResult for RepresentativeInfoData {} /// /// * [voter info query elections](struct.ElectionVoterInfoQueryCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VoterInfoResponse { /// Locations where the voter is eligible to vote early, prior to election day. #[serde(rename="earlyVoteSites")] @@ -829,7 +833,7 @@ impl ResponseResult for VoterInfoResponse {} /// * [voter info query elections](struct.ElectionVoterInfoQueryCall.html) (none) /// * [election query elections](struct.ElectionElectionQueryCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Election { /// Day of the election in YYYY-MM-DD format. #[serde(rename="electionDay")] @@ -1196,21 +1200,19 @@ impl<'a, C, A> DivisionSearchCall<'a, C, A> where C: BorrowMut, A } - /// Sets the *query* query property to the given value. - /// - /// /// The search query. Queries can cover any parts of a OCD ID or a human readable division name. All words given in the query are treated as required patterns. In addition to that, most query operators of the Apache Lucene library are supported. See http://lucene.apache.org/core/2_9_4/queryparsersyntax.html + /// + /// Sets the *query* query property to the given value. pub fn query(mut self, new_value: &str) -> DivisionSearchCall<'a, C, A> { self._query = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DivisionSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1380,13 +1382,12 @@ impl<'a, C, A> ElectionElectionQueryCall<'a, C, A> where C: BorrowMut ElectionElectionQueryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1568,39 +1569,36 @@ impl<'a, C, A> ElectionVoterInfoQueryCall<'a, C, A> where C: BorrowMut ElectionVoterInfoQueryCall<'a, C, A> { self._address = new_value.to_string(); self } - /// Sets the *official only* query property to the given value. - /// - /// /// If set to true, only data from official state sources will be returned. + /// + /// Sets the *official only* query property to the given value. pub fn official_only(mut self, new_value: bool) -> ElectionVoterInfoQueryCall<'a, C, A> { self._official_only = Some(new_value); self } - /// Sets the *election id* query property to the given value. - /// - /// /// The unique ID of the election to look up. A list of election IDs can be obtained at https://www.googleapis.com/civicinfo/{version}/elections + /// + /// Sets the *election id* query property to the given value. pub fn election_id(mut self, new_value: &str) -> ElectionVoterInfoQueryCall<'a, C, A> { self._election_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ElectionVoterInfoQueryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1798,47 +1796,42 @@ impl<'a, C, A> RepresentativeRepresentativeInfoByAddresCall<'a, C, A> where C: B } + /// A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned. + /// /// Append the given value to the *roles* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned. pub fn add_roles(mut self, new_value: &str) -> RepresentativeRepresentativeInfoByAddresCall<'a, C, A> { self._roles.push(new_value.to_string()); self } + /// A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned. + /// /// Append the given value to the *levels* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned. pub fn add_levels(mut self, new_value: &str) -> RepresentativeRepresentativeInfoByAddresCall<'a, C, A> { self._levels.push(new_value.to_string()); self } - /// Sets the *include offices* query property to the given value. - /// - /// /// Whether to return information about offices and officials. If false, only the top-level district information will be returned. + /// + /// Sets the *include offices* query property to the given value. pub fn include_offices(mut self, new_value: bool) -> RepresentativeRepresentativeInfoByAddresCall<'a, C, A> { self._include_offices = Some(new_value); self } - /// Sets the *address* query property to the given value. - /// - /// /// The address to look up. May only be specified if the field ocdId is not given in the URL. + /// + /// Sets the *address* query property to the given value. pub fn address(mut self, new_value: &str) -> RepresentativeRepresentativeInfoByAddresCall<'a, C, A> { self._address = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RepresentativeRepresentativeInfoByAddresCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2057,49 +2050,45 @@ impl<'a, C, A> RepresentativeRepresentativeInfoByDivisionCall<'a, C, A> where C: } + /// The Open Civic Data division identifier of the division to look up. + /// /// Sets the *ocd id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The Open Civic Data division identifier of the division to look up. pub fn ocd_id(mut self, new_value: &str) -> RepresentativeRepresentativeInfoByDivisionCall<'a, C, A> { self._ocd_id = new_value.to_string(); self } + /// A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned. + /// /// Append the given value to the *roles* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned. pub fn add_roles(mut self, new_value: &str) -> RepresentativeRepresentativeInfoByDivisionCall<'a, C, A> { self._roles.push(new_value.to_string()); self } - /// Sets the *recursive* query property to the given value. - /// - /// /// If true, information about all divisions contained in the division requested will be included as well. For example, if querying ocd-division/country:us/district:dc, this would also return all DC's wards and ANCs. + /// + /// Sets the *recursive* query property to the given value. pub fn recursive(mut self, new_value: bool) -> RepresentativeRepresentativeInfoByDivisionCall<'a, C, A> { self._recursive = Some(new_value); self } + /// A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned. + /// /// Append the given value to the *levels* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned. pub fn add_levels(mut self, new_value: &str) -> RepresentativeRepresentativeInfoByDivisionCall<'a, C, A> { self._levels.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RepresentativeRepresentativeInfoByDivisionCall<'a, C, A> { self._delegate = Some(new_value); self diff --git a/gen/cloudlatencytest2/README.md b/gen/cloudlatencytest2/README.md index c9648b1491..58c974cdbf 100644 --- a/gen/cloudlatencytest2/README.md +++ b/gen/cloudlatencytest2/README.md @@ -100,16 +100,18 @@ let result = hub.statscollection().updatestats(&req) match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/cloudlatencytest2/src/cmn.rs b/gen/cloudlatencytest2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/cloudlatencytest2/src/cmn.rs +++ b/gen/cloudlatencytest2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/cloudlatencytest2/src/lib.rs b/gen/cloudlatencytest2/src/lib.rs index 6578e2d914..de849e1f7c 100644 --- a/gen/cloudlatencytest2/src/lib.rs +++ b/gen/cloudlatencytest2/src/lib.rs @@ -101,16 +101,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -274,16 +276,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -409,7 +413,7 @@ impl RequestValue for AggregatedStats {} /// /// * [updateaggregatedstats statscollection](struct.StatscollectionUpdateaggregatedstatCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AggregatedStatsReply { /// no description provided #[serde(rename="testValue")] @@ -443,7 +447,7 @@ impl Part for DoubleValue {} /// /// * [updatestats statscollection](struct.StatscollectionUpdatestatCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct StatsReply { /// no description provided #[serde(rename="testValue")] @@ -696,22 +700,21 @@ impl<'a, C, A> StatscollectionUpdateaggregatedstatCall<'a, C, A> where C: Borrow } + /// /// Sets the *request* property to the given value. /// /// 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: &AggregatedStats) -> StatscollectionUpdateaggregatedstatCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StatscollectionUpdateaggregatedstatCall<'a, C, A> { self._delegate = Some(new_value); self @@ -741,8 +744,8 @@ impl<'a, C, A> StatscollectionUpdateaggregatedstatCall<'a, C, A> where C: Borrow /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MonitoringReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -915,22 +918,21 @@ impl<'a, C, A> StatscollectionUpdatestatCall<'a, C, A> where C: BorrowMut StatscollectionUpdatestatCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StatscollectionUpdatestatCall<'a, C, A> { self._delegate = Some(new_value); self @@ -960,8 +962,8 @@ impl<'a, C, A> StatscollectionUpdatestatCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/cloudmonitoring2_beta2/src/cmn.rs b/gen/cloudmonitoring2_beta2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/cloudmonitoring2_beta2/src/cmn.rs +++ b/gen/cloudmonitoring2_beta2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/cloudmonitoring2_beta2/src/lib.rs b/gen/cloudmonitoring2_beta2/src/lib.rs index f276a08bc6..71c58ea46a 100644 --- a/gen/cloudmonitoring2_beta2/src/lib.rs +++ b/gen/cloudmonitoring2_beta2/src/lib.rs @@ -113,16 +113,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -289,16 +291,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -371,7 +375,7 @@ impl Part for PointDistributionUnderflowBucket {} /// /// * [list metric descriptors](struct.MetricDescriptorListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListMetricDescriptorsResponse { /// The returned metric descriptors. pub metrics: Vec, @@ -565,7 +569,7 @@ impl ResponseResult for MetricDescriptor {} /// /// * [write timeseries](struct.TimeseryWriteCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct WriteTimeseriesResponse { /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#writeTimeseriesResponse". pub kind: String, @@ -583,7 +587,7 @@ impl ResponseResult for WriteTimeseriesResponse {} /// /// * [delete metric descriptors](struct.MetricDescriptorDeleteCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DeleteMetricDescriptorResponse { /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#deleteMetricDescriptorResponse". pub kind: String, @@ -669,7 +673,7 @@ impl Resource for TimeseriesDescriptor {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Timeseries { /// The descriptor of this time series. #[serde(rename="timeseriesDesc")] @@ -706,7 +710,7 @@ impl Part for PointDistributionOverflowBucket {} /// /// * [list timeseries descriptors](struct.TimeseriesDescriptorListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListTimeseriesDescriptorsResponse { /// Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, set this value to the pageToken query parameter. #[serde(rename="nextPageToken")] @@ -733,7 +737,7 @@ impl ResponseResult for ListTimeseriesDescriptorsResponse {} /// /// * [list timeseries](struct.TimeseryListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListTimeseriesResponse { /// Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, set the pageToken query parameter to this value. All of the points of a time series will be returned before returning any point of the subsequent time series. #[serde(rename="nextPageToken")] @@ -1250,60 +1254,56 @@ impl<'a, C, A> TimeseriesDescriptorListCall<'a, C, A> where C: BorrowMut TimeseriesDescriptorListCall<'a, C, A> { self._request = new_value.clone(); self } + /// The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. pub fn project(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. + /// /// Sets the *metric* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. pub fn metric(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, A> { self._metric = new_value.to_string(); self } + /// End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. + /// /// Sets the *youngest* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. pub fn youngest(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, A> { self._youngest = new_value.to_string(); self } - /// Sets the *window* query property to the given value. - /// - /// /// The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for non-cumulative metric types. Units: /// - m: minute /// - h: hour /// - d: day /// - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead. + /// + /// Sets the *window* query property to the given value. pub fn window(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, A> { self._window = Some(new_value.to_string()); self } - /// Sets the *timespan* query property to the given value. - /// - /// /// Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest parameters should not be used together. Units: /// - s: second /// - m: minute @@ -1312,63 +1312,59 @@ impl<'a, C, A> TimeseriesDescriptorListCall<'a, C, A> where C: BorrowMut TimeseriesDescriptorListCall<'a, C, A> { self._timespan = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *oldest* query property to the given value. - /// - /// /// Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest] + /// + /// Sets the *oldest* query property to the given value. pub fn oldest(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, A> { self._oldest = Some(new_value.to_string()); self } - /// Append the given value to the *labels* query property. - /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// /// A collection of labels for the matching time series, which are represented as: /// - key==value: key equals the value /// - key=~value: key regex matches the value /// - key!=value: key does not equal the value /// - key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could specify: /// label=cloud.googleapis.com%2Flocation=~us-central1.* + /// + /// Append the given value to the *labels* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. pub fn add_labels(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, A> { self._labels.push(new_value.to_string()); self } - /// Sets the *count* query property to the given value. - /// - /// /// Maximum number of time series descriptors per page. Used for pagination. If not specified, count = 100. + /// + /// Sets the *count* query property to the given value. pub fn count(mut self, new_value: i32) -> TimeseriesDescriptorListCall<'a, C, A> { self._count = Some(new_value); self } - /// Sets the *aggregator* query property to the given value. - /// - /// /// The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics with a value type of INT64 or DOUBLE. + /// + /// Sets the *aggregator* query property to the given value. pub fn aggregator(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, A> { self._aggregator = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TimeseriesDescriptorListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1398,8 +1394,8 @@ impl<'a, C, A> TimeseriesDescriptorListCall<'a, C, A> where C: BorrowMut TimeseryWriteCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &WriteTimeseriesRequest) -> TimeseryWriteCall<'a, C, A> { self._request = new_value.clone(); self } + /// The project ID. The value can be the numeric project ID or string-based project name. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The project ID. The value can be the numeric project ID or string-based project name. pub fn project(mut self, new_value: &str) -> TimeseryWriteCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TimeseryWriteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1653,8 +1648,8 @@ impl<'a, C, A> TimeseryWriteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Monitoring`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1896,60 +1891,56 @@ impl<'a, C, A> TimeseryListCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &ListTimeseriesRequest) -> TimeseryListCall<'a, C, A> { self._request = new_value.clone(); self } + /// The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. pub fn project(mut self, new_value: &str) -> TimeseryListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. + /// /// Sets the *metric* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. pub fn metric(mut self, new_value: &str) -> TimeseryListCall<'a, C, A> { self._metric = new_value.to_string(); self } + /// End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. + /// /// Sets the *youngest* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. pub fn youngest(mut self, new_value: &str) -> TimeseryListCall<'a, C, A> { self._youngest = new_value.to_string(); self } - /// Sets the *window* query property to the given value. - /// - /// /// The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for non-cumulative metric types. Units: /// - m: minute /// - h: hour /// - d: day /// - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead. + /// + /// Sets the *window* query property to the given value. pub fn window(mut self, new_value: &str) -> TimeseryListCall<'a, C, A> { self._window = Some(new_value.to_string()); self } - /// Sets the *timespan* query property to the given value. - /// - /// /// Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest parameters should not be used together. Units: /// - s: second /// - m: minute @@ -1958,63 +1949,59 @@ impl<'a, C, A> TimeseryListCall<'a, C, A> where C: BorrowMut, A: /// - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead. /// /// If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest]. + /// + /// Sets the *timespan* query property to the given value. pub fn timespan(mut self, new_value: &str) -> TimeseryListCall<'a, C, A> { self._timespan = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TimeseryListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *oldest* query property to the given value. - /// - /// /// Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest] + /// + /// Sets the *oldest* query property to the given value. pub fn oldest(mut self, new_value: &str) -> TimeseryListCall<'a, C, A> { self._oldest = Some(new_value.to_string()); self } - /// Append the given value to the *labels* query property. - /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// /// A collection of labels for the matching time series, which are represented as: /// - key==value: key equals the value /// - key=~value: key regex matches the value /// - key!=value: key does not equal the value /// - key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could specify: /// label=cloud.googleapis.com%2Flocation=~us-central1.* + /// + /// Append the given value to the *labels* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. pub fn add_labels(mut self, new_value: &str) -> TimeseryListCall<'a, C, A> { self._labels.push(new_value.to_string()); self } - /// Sets the *count* query property to the given value. - /// - /// /// Maximum number of data points per page, which is used for pagination of results. + /// + /// Sets the *count* query property to the given value. pub fn count(mut self, new_value: i32) -> TimeseryListCall<'a, C, A> { self._count = Some(new_value); self } - /// Sets the *aggregator* query property to the given value. - /// - /// /// The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics with a value type of INT64 or DOUBLE. + /// + /// Sets the *aggregator* query property to the given value. pub fn aggregator(mut self, new_value: &str) -> TimeseryListCall<'a, C, A> { self._aggregator = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TimeseryListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2044,8 +2031,8 @@ impl<'a, C, A> TimeseryListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Monitoring`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2259,56 +2246,52 @@ impl<'a, C, A> MetricDescriptorListCall<'a, C, A> where C: BorrowMut MetricDescriptorListCall<'a, C, A> { self._request = new_value.clone(); self } + /// The project id. The value can be the numeric project ID or string-based project name. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The project id. The value can be the numeric project ID or string-based project name. pub fn project(mut self, new_value: &str) -> MetricDescriptorListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *query* query property to the given value. - /// - /// /// The query used to search against existing metrics. Separate keywords with a space; the service joins all keywords with AND, meaning that all keywords must match for a metric to be returned. If this field is omitted, all metrics are returned. If an empty string is passed with this field, no metrics are returned. + /// + /// Sets the *query* query property to the given value. pub fn query(mut self, new_value: &str) -> MetricDescriptorListCall<'a, C, A> { self._query = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> MetricDescriptorListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *count* query property to the given value. - /// - /// /// Maximum number of metric descriptors per page. Used for pagination. If not specified, count = 100. + /// + /// Sets the *count* query property to the given value. pub fn count(mut self, new_value: i32) -> MetricDescriptorListCall<'a, C, A> { self._count = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MetricDescriptorListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2338,8 +2321,8 @@ impl<'a, C, A> MetricDescriptorListCall<'a, C, A> where C: BorrowMut MetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut MetricDescriptorDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the metric. + /// /// Sets the *metric* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the metric. pub fn metric(mut self, new_value: &str) -> MetricDescriptorDeleteCall<'a, C, A> { self._metric = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MetricDescriptorDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2581,8 +2563,8 @@ impl<'a, C, A> MetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut MetricDescriptorCreateCall<'a, C, A> where C: BorrowMut MetricDescriptorCreateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The project id. The value can be the numeric project ID or string-based project name. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The project id. The value can be the numeric project ID or string-based project name. pub fn project(mut self, new_value: &str) -> MetricDescriptorCreateCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MetricDescriptorCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2836,8 +2817,8 @@ impl<'a, C, A> MetricDescriptorCreateCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/cloudsearch1/src/cmn.rs b/gen/cloudsearch1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/cloudsearch1/src/cmn.rs +++ b/gen/cloudsearch1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/cloudsearch1/src/lib.rs b/gen/cloudsearch1/src/lib.rs index 7f226b8565..078fa366ba 100644 --- a/gen/cloudsearch1/src/lib.rs +++ b/gen/cloudsearch1/src/lib.rs @@ -96,16 +96,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -271,16 +273,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -331,7 +335,7 @@ impl<'a, C, A> Cloudsearch /// /// * [indexes documents list projects](struct.ProjectIndexeDocumentListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListDocumentsResponse { /// If there are more results, retrieve them by invoking list documents call with the same arguments and this `nextPageToken`. If there are no more results, this field is not set. #[serde(rename="nextPageToken")] @@ -347,7 +351,7 @@ impl ResponseResult for ListDocumentsResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct IndexInfo { /// The project associated with the index. It cannot be the empty string. #[serde(rename="projectId")] @@ -367,7 +371,7 @@ impl Part for IndexInfo {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchResult { /// If there are more results, retrieve them by invoking search call with the same arguments and this `nextPageToken`. If there are no more results, this field is not set. #[serde(rename="nextPageToken")] @@ -386,7 +390,7 @@ impl Part for SearchResult {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FieldNames { /// The names of fields in which TEXT values are stored. #[serde(rename="textFields")] @@ -433,7 +437,7 @@ impl Part for FieldValueList {} /// /// * [indexes list projects](struct.ProjectIndexeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListIndexesResponse { /// If there are more results, retrieve them by invoking list indexes call with the same arguments and this `nextPageToken`. If there are no more results, this field is not set. #[serde(rename="nextPageToken")] @@ -454,7 +458,7 @@ impl ResponseResult for ListIndexesResponse {} /// /// * [indexes search projects](struct.ProjectIndexeSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchResponse { /// The number of documents that match the query. It is greater than or equal to the number of documents actually returned. This is an approximation and not an exact count unless it is less than or equal to `matchedCountAccuracy` in search parameter. #[serde(rename="matchedCount")] @@ -528,7 +532,7 @@ impl Part for FieldValue {} /// /// * [indexes documents delete projects](struct.ProjectIndexeDocumentDeleteCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Empty; impl ResponseResult for Empty {} @@ -914,63 +918,62 @@ impl<'a, C, A> ProjectIndexeListCall<'a, C, A> where C: BorrowMut } + /// The project from which to retrieve indexes. It cannot be the empty string. + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The project from which to retrieve indexes. It cannot be the empty string. pub fn project_id(mut self, new_value: &str) -> ProjectIndexeListCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The prefix of the index name. It is used to list all indexes with names that have this prefix. + /// /// Sets the *index name prefix* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The prefix of the index name. It is used to list all indexes with names that have this prefix. pub fn index_name_prefix(mut self, new_value: &str) -> ProjectIndexeListCall<'a, C, A> { self._index_name_prefix = new_value.to_string(); self } + /// The maximum number of indexes to return per page. If not specified, 100 indexes are returned per page. + /// /// Sets the *page size* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The maximum number of indexes to return per page. If not specified, 100 indexes are returned per page. pub fn page_size(mut self, new_value: i32) -> ProjectIndexeListCall<'a, C, A> { self._page_size = new_value; self } + /// A `nextPageToken` returned from previous list indexes call as the starting point for this call. If not specified, list indexes from the beginning. + /// /// Sets the *page token* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A `nextPageToken` returned from previous list indexes call as the starting point for this call. If not specified, list indexes from the beginning. pub fn page_token(mut self, new_value: &str) -> ProjectIndexeListCall<'a, C, A> { self._page_token = new_value.to_string(); self } + /// Specifies which parts of the IndexInfo resource is returned in the response. If not specified, `ID_ONLY` is used. + /// /// Sets the *view* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Specifies which parts of the IndexInfo resource is returned in the response. If not specified, `ID_ONLY` is used. pub fn view(mut self, new_value: &str) -> ProjectIndexeListCall<'a, C, A> { self._view = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectIndexeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1004,8 +1007,8 @@ impl<'a, C, A> ProjectIndexeListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1193,43 +1196,42 @@ impl<'a, C, A> ProjectIndexeDocumentGetCall<'a, C, A> where C: BorrowMut ProjectIndexeDocumentGetCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The index from which to retrieve the document. It cannot be the empty string. + /// /// Sets the *index id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The index from which to retrieve the document. It cannot be the empty string. pub fn index_id(mut self, new_value: &str) -> ProjectIndexeDocumentGetCall<'a, C, A> { self._index_id = new_value.to_string(); self } + /// The identifier of the document to retrieve. It cannot be the empty string. + /// /// Sets the *doc id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The identifier of the document to retrieve. It cannot be the empty string. pub fn doc_id(mut self, new_value: &str) -> ProjectIndexeDocumentGetCall<'a, C, A> { self._doc_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectIndexeDocumentGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1263,8 +1265,8 @@ impl<'a, C, A> ProjectIndexeDocumentGetCall<'a, C, A> where C: BorrowMut ProjectIndexeSearchCall<'a, C, A> where C: BorrowMut ProjectIndexeSearchCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The index to search. It cannot be the empty string. + /// /// Sets the *index id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The index to search. It cannot be the empty string. pub fn index_id(mut self, new_value: &str) -> ProjectIndexeSearchCall<'a, C, A> { self._index_id = new_value.to_string(); self } + /// The query string in search query syntax. If the query is missing or empty, all documents are returned. + /// /// Sets the *query* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The query string in search query syntax. If the query is missing or empty, all documents are returned. pub fn query(mut self, new_value: &str) -> ProjectIndexeSearchCall<'a, C, A> { self._query = new_value.to_string(); self } + /// Customized expressions used in `orderBy` or `returnFields`. The expression can contain fields in `Document`, the built-in fields ( `_rank`, the document rank, and `_score` if scoring is enabled) and fields defined in `fieldExpressions`. Each field expression is represented in a json object with the following fields: * `name`: the name of the field expression in string. * `expression`: the expression to be computed. It can be a combination of supported functions encoded in string. Expressions involving number fields can use the arithmetical operators (`+`, `-`, `*`, `/`) and the built-in numeric functions (`max`, `min`, `pow`, `count`, `log`, `abs`). Expressions involving geopoint fields can use the `geopoint` and `distance` functions. Expressions for text and html fields can use the `snippet` function. For example: ``` fieldExpressions={name: "TotalPrice", expression: "(Price+Tax)"} ``` ``` fieldExpressions={name: "snippet", expression: "snippet('good times', content)"} ``` The field expression names can be used in `orderBy` and `returnFields` after they are defined in `fieldExpressions`. + /// /// Append the given value to the *field expressions* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Customized expressions used in `orderBy` or `returnFields`. The expression can contain fields in `Document`, the built-in fields ( `_rank`, the document rank, and `_score` if scoring is enabled) and fields defined in `fieldExpressions`. Each field expression is represented in a json object with the following fields: * `name`: the name of the field expression in string. * `expression`: the expression to be computed. It can be a combination of supported functions encoded in string. Expressions involving number fields can use the arithmetical operators (`+`, `-`, `*`, `/`) and the built-in numeric functions (`max`, `min`, `pow`, `count`, `log`, `abs`). Expressions involving geopoint fields can use the `geopoint` and `distance` functions. Expressions for text and html fields can use the `snippet` function. For example: ``` fieldExpressions={name: "TotalPrice", expression: "(Price+Tax)"} ``` ``` fieldExpressions={name: "snippet", expression: "snippet('good times', content)"} ``` The field expression names can be used in `orderBy` and `returnFields` after they are defined in `fieldExpressions`. pub fn add_field_expressions(mut self, new_value: &str) -> ProjectIndexeSearchCall<'a, C, A> { self._field_expressions.push(new_value.to_string()); self } + /// The maximum number of search results to return per page. Searches perform best when the `pageSize` is kept as small as possible. If not specified, 10 results are returned per page. + /// /// Sets the *page size* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The maximum number of search results to return per page. Searches perform best when the `pageSize` is kept as small as possible. If not specified, 10 results are returned per page. pub fn page_size(mut self, new_value: i32) -> ProjectIndexeSearchCall<'a, C, A> { self._page_size = new_value; self } + /// A `nextPageToken` returned from previous Search call as the starting point for this call. Pagination tokens provide better performance and consistency than offsets, and they cannot be used in combination with offsets. + /// /// Sets the *page token* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A `nextPageToken` returned from previous Search call as the starting point for this call. Pagination tokens provide better performance and consistency than offsets, and they cannot be used in combination with offsets. pub fn page_token(mut self, new_value: &str) -> ProjectIndexeSearchCall<'a, C, A> { self._page_token = new_value.to_string(); self } + /// Offset is used to move to an arbitrary result, independent of the previous results. Offsets are inefficient when compared to `pageToken`. `pageToken` and `offset` cannot be both set. The default value of `offset` is 0. + /// /// Sets the *offset* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Offset is used to move to an arbitrary result, independent of the previous results. Offsets are inefficient when compared to `pageToken`. `pageToken` and `offset` cannot be both set. The default value of `offset` is 0. pub fn offset(mut self, new_value: i32) -> ProjectIndexeSearchCall<'a, C, A> { self._offset = new_value; self } + /// Minimum accuracy requirement for `matchedCount` in search response. If specified, `matchedCount` will be accurate up to at least that number. For example, when set to 100, any `matchedCount <= 100` is accurate. This option may add considerable latency/expense. By default (when it is not specified or set to 0), the accuracy is the same as `pageSize`. + /// /// Sets the *matched count accuracy* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Minimum accuracy requirement for `matchedCount` in search response. If specified, `matchedCount` will be accurate up to at least that number. For example, when set to 100, any `matchedCount <= 100` is accurate. This option may add considerable latency/expense. By default (when it is not specified or set to 0), the accuracy is the same as `pageSize`. pub fn matched_count_accuracy(mut self, new_value: i32) -> ProjectIndexeSearchCall<'a, C, A> { self._matched_count_accuracy = new_value; self } + /// Comma-separated list of fields for sorting on the search result, including fields from `Document`, the built-in fields (`_rank` and `_score`), and fields defined in `fieldExpressions`. For example: `orderBy="foo,bar"`. The default sorting order is ascending. To specify descending order for a field, a suffix `" desc"` should be appended to the field name. For example: `orderBy="foo desc,bar"`. The default value for text sort is the empty string, and the default value for numeric sort is 0. If not specified, the search results are automatically sorted by descending `_rank`. Sorting by ascending `_rank` is not allowed. + /// /// Sets the *order by* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Comma-separated list of fields for sorting on the search result, including fields from `Document`, the built-in fields (`_rank` and `_score`), and fields defined in `fieldExpressions`. For example: `orderBy="foo,bar"`. The default sorting order is ascending. To specify descending order for a field, a suffix `" desc"` should be appended to the field name. For example: `orderBy="foo desc,bar"`. The default value for text sort is the empty string, and the default value for numeric sort is 0. If not specified, the search results are automatically sorted by descending `_rank`. Sorting by ascending `_rank` is not allowed. pub fn order_by(mut self, new_value: &str) -> ProjectIndexeSearchCall<'a, C, A> { self._order_by = new_value.to_string(); self } + /// The scoring function to invoke on a search result for this query. If `scorer` is not set, scoring is disabled and `_score` is 0 for all documents in the search result. To enable document relevancy score based on term frequency, set `"scorer=generic"`. + /// /// Sets the *scorer* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The scoring function to invoke on a search result for this query. If `scorer` is not set, scoring is disabled and `_score` is 0 for all documents in the search result. To enable document relevancy score based on term frequency, set `"scorer=generic"`. pub fn scorer(mut self, new_value: &str) -> ProjectIndexeSearchCall<'a, C, A> { self._scorer = new_value.to_string(); self } + /// Maximum number of top retrieved results to score. It is valid only when `scorer` is set. If not specified, 100 retrieved results are scored. + /// /// Sets the *scorer size* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Maximum number of top retrieved results to score. It is valid only when `scorer` is set. If not specified, 100 retrieved results are scored. pub fn scorer_size(mut self, new_value: i32) -> ProjectIndexeSearchCall<'a, C, A> { self._scorer_size = new_value; self } + /// List of fields to return in `SearchResult` objects. It can be fields from `Document`, the built-in fields `_rank` and `_score`, and fields defined in `fieldExpressions`. Use `"*"` to return all fields from `Document`. + /// /// Append the given value to the *return fields* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// List of fields to return in `SearchResult` objects. It can be fields from `Document`, the built-in fields `_rank` and `_score`, and fields defined in `fieldExpressions`. Use `"*"` to return all fields from `Document`. pub fn add_return_fields(mut self, new_value: &str) -> ProjectIndexeSearchCall<'a, C, A> { self._return_fields.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectIndexeSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1644,8 +1645,8 @@ impl<'a, C, A> ProjectIndexeSearchCall<'a, C, A> where C: BorrowMut ProjectIndexeDocumentListCall<'a, C, A> where C: BorrowMut ProjectIndexeDocumentListCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The index from which to list the documents. It cannot be the empty string. + /// /// Sets the *index id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The index from which to list the documents. It cannot be the empty string. pub fn index_id(mut self, new_value: &str) -> ProjectIndexeDocumentListCall<'a, C, A> { self._index_id = new_value.to_string(); self } + /// The maximum number of documents to return per page. If not specified, 100 documents are returned per page. + /// /// Sets the *page size* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The maximum number of documents to return per page. If not specified, 100 documents are returned per page. pub fn page_size(mut self, new_value: i32) -> ProjectIndexeDocumentListCall<'a, C, A> { self._page_size = new_value; self } + /// A `nextPageToken` returned from previous list documents call as the starting point for this call. If not specified, list documents from the beginning. + /// /// Sets the *page token* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A `nextPageToken` returned from previous list documents call as the starting point for this call. If not specified, list documents from the beginning. pub fn page_token(mut self, new_value: &str) -> ProjectIndexeDocumentListCall<'a, C, A> { self._page_token = new_value.to_string(); self } + /// Specifies which part of the document resource is returned in the response. If not specified, `ID_ONLY` is used. + /// /// Sets the *view* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Specifies which part of the document resource is returned in the response. If not specified, `ID_ONLY` is used. pub fn view(mut self, new_value: &str) -> ProjectIndexeDocumentListCall<'a, C, A> { self._view = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectIndexeDocumentListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1927,8 +1927,8 @@ impl<'a, C, A> ProjectIndexeDocumentListCall<'a, C, A> where C: BorrowMut ProjectIndexeDocumentCreateCall<'a, C, A> where C: BorrowMut ProjectIndexeDocumentCreateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The project associated with the index for adding document. It cannot be the empty string. + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The project associated with the index for adding document. It cannot be the empty string. pub fn project_id(mut self, new_value: &str) -> ProjectIndexeDocumentCreateCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The index to add document to. It cannot be the empty string. + /// /// Sets the *index id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The index to add document to. It cannot be the empty string. pub fn index_id(mut self, new_value: &str) -> ProjectIndexeDocumentCreateCall<'a, C, A> { self._index_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectIndexeDocumentCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2198,8 +2197,8 @@ impl<'a, C, A> ProjectIndexeDocumentCreateCall<'a, C, A> where C: BorrowMut ProjectIndexeDocumentDeleteCall<'a, C, A> where C: BorrowMut ProjectIndexeDocumentDeleteCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The index from which to delete the document. It cannot be the empty string. + /// /// Sets the *index id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The index from which to delete the document. It cannot be the empty string. pub fn index_id(mut self, new_value: &str) -> ProjectIndexeDocumentDeleteCall<'a, C, A> { self._index_id = new_value.to_string(); self } + /// The document to be deleted. It cannot be the empty string. + /// /// Sets the *doc id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The document to be deleted. It cannot be the empty string. pub fn doc_id(mut self, new_value: &str) -> ProjectIndexeDocumentDeleteCall<'a, C, A> { self._doc_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectIndexeDocumentDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2457,8 +2455,8 @@ impl<'a, C, A> ProjectIndexeDocumentDeleteCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/compute1/src/cmn.rs b/gen/compute1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/compute1/src/cmn.rs +++ b/gen/compute1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/compute1/src/lib.rs b/gen/compute1/src/lib.rs index 527e187e56..a88dfe614f 100644 --- a/gen/compute1/src/lib.rs +++ b/gen/compute1/src/lib.rs @@ -228,16 +228,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -415,16 +417,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -554,7 +558,7 @@ impl<'a, C, A> Compute /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VpnTunnelsScopedList { /// List of vpn tunnels contained in this scope. #[serde(rename="vpnTunnels")] @@ -575,7 +579,7 @@ impl Part for VpnTunnelsScopedList {} /// /// * [get serial port output instances](struct.InstanceGetSerialPortOutputCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SerialPortOutput { /// [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output. pub kind: String, @@ -593,7 +597,7 @@ impl ResponseResult for SerialPortOutput {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationsScopedList { /// [Output Only] List of operations contained in this scope. pub operations: Vec, @@ -613,7 +617,7 @@ impl Part for OperationsScopedList {} /// /// * [list url maps](struct.UrlMapListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UrlMapList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -636,7 +640,7 @@ impl ResponseResult for UrlMapList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetInstancesScopedListWarning { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -654,7 +658,7 @@ impl Part for TargetInstancesScopedListWarning {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstancesScopedListWarning { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -679,7 +683,7 @@ impl Part for InstancesScopedListWarning {} /// * [list disk types](struct.DiskTypeListCall.html) (none) /// * [get disk types](struct.DiskTypeGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DiskType { /// [Output Only] Type of the resource. Always compute#diskType for disk types. pub kind: String, @@ -795,7 +799,7 @@ impl ResponseResult for Instance {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MachineTypesScopedList { /// [Output Only] List of machine types contained in this scope. #[serde(rename="machineTypes")] @@ -816,7 +820,7 @@ impl Part for MachineTypesScopedList {} /// /// * [aggregated list vpn tunnels](struct.VpnTunnelAggregatedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VpnTunnelAggregatedList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -844,7 +848,7 @@ impl ResponseResult for VpnTunnelAggregatedList {} /// /// * [aggregated list global operations](struct.GlobalOperationAggregatedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationAggregatedList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -872,7 +876,7 @@ impl ResponseResult for OperationAggregatedList {} /// /// * [list images](struct.ImageListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImageList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -918,7 +922,7 @@ impl RequestValue for Metadata {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DiskTypesScopedListWarning { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -936,7 +940,7 @@ impl Part for DiskTypesScopedListWarning {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ForwardingRulesScopedListWarningData { /// [Output Only] A key for the warning data. pub key: String, @@ -1032,7 +1036,7 @@ impl ResponseResult for TargetHttpProxy {} /// /// * [aggregated list disks](struct.DiskAggregatedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DiskAggregatedList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -1055,7 +1059,7 @@ impl ResponseResult for DiskAggregatedList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AddressesScopedList { /// [Output Only] Informational warning which replaces the list of addresses when the list is empty. pub warning: AddressesScopedListWarning, @@ -1077,7 +1081,7 @@ impl Part for AddressesScopedList {} /// * [aggregated list machine types](struct.MachineTypeAggregatedListCall.html) (none) /// * [get machine types](struct.MachineTypeGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MachineType { /// [Output Only] The tumber of CPUs exposed to the instance. #[serde(rename="guestCpus")] @@ -1141,7 +1145,7 @@ impl Part for MetadataItems {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstancesScopedListWarningData { /// [Output Only] A key for the warning data. pub key: String, @@ -1163,7 +1167,7 @@ impl Part for InstancesScopedListWarningData {} /// * [list addresses](struct.AddresseListCall.html) (response) /// * [list global addresses](struct.GlobalAddresseListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AddressList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -1191,7 +1195,7 @@ impl ResponseResult for AddressList {} /// /// * [list disk types](struct.DiskTypeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DiskTypeList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -1214,7 +1218,7 @@ impl ResponseResult for DiskTypeList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetVpnGatewaysScopedListWarningData { /// [Output Only] A key for the warning data. pub key: String, @@ -1235,7 +1239,7 @@ impl Part for TargetVpnGatewaysScopedListWarningData {} /// /// * [aggregated list addresses](struct.AddresseAggregatedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AddressAggregatedList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -1258,7 +1262,7 @@ impl ResponseResult for AddressAggregatedList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UrlMapValidationResult { /// no description provided #[serde(rename="testFailures")] @@ -1281,7 +1285,7 @@ impl Part for UrlMapValidationResult {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetPoolsScopedListWarning { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -1320,7 +1324,7 @@ impl Part for PathMatcher {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetInstancesScopedListWarningData { /// [Output Only] A key for the warning data. pub key: String, @@ -1341,7 +1345,7 @@ impl Part for TargetInstancesScopedListWarningData {} /// /// * [list snapshots](struct.SnapshotListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SnapshotList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -1370,7 +1374,7 @@ impl ResponseResult for SnapshotList {} /// * [list regions](struct.RegionListCall.html) (none) /// * [get regions](struct.RegionGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Region { /// [Output Only] Status of the region, either UP or DOWN. pub status: String, @@ -1443,7 +1447,7 @@ impl Part for ServiceAccount {} /// * [get projects](struct.ProjectGetCall.html) (response) /// * [move disk projects](struct.ProjectMoveDiskCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Project { /// [Output Only] Type of the resource. Always compute#project for projects. pub kind: String, @@ -1477,7 +1481,7 @@ impl ResponseResult for Project {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MachineTypesScopedListWarningData { /// [Output Only] A key for the warning data. pub key: String, @@ -1547,7 +1551,7 @@ impl ResponseResult for Snapshot {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DiskTypesScopedList { /// [Output Only] Informational warning which replaces the list of disk types when the list is empty. pub warning: DiskTypesScopedListWarning, @@ -1623,7 +1627,7 @@ impl ResponseResult for BackendService {} /// /// * [aggregated list target vpn gateways](struct.TargetVpnGatewayAggregatedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetVpnGatewayAggregatedList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -1669,7 +1673,7 @@ impl RequestValue for ResourceGroupReference {} /// /// * [list machine types](struct.MachineTypeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MachineTypeList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -1692,7 +1696,7 @@ impl ResponseResult for MachineTypeList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DisksScopedListWarningData { /// [Output Only] A key for the warning data. pub key: String, @@ -1708,7 +1712,7 @@ impl Part for DisksScopedListWarningData {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationWarningsData { /// [Output Only] A key for the warning data. pub key: String, @@ -1730,7 +1734,7 @@ impl Part for OperationWarningsData {} /// * [list global forwarding rules](struct.GlobalForwardingRuleListCall.html) (response) /// * [list forwarding rules](struct.ForwardingRuleListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ForwardingRuleList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -1753,7 +1757,7 @@ impl ResponseResult for ForwardingRuleList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ForwardingRulesScopedListWarning { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -1776,7 +1780,7 @@ impl Part for ForwardingRulesScopedListWarning {} /// /// * [list firewalls](struct.FirewallListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FirewallList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -1818,7 +1822,7 @@ impl Part for UrlMapTest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationWarnings { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -1920,7 +1924,7 @@ impl Part for HostRule {} /// * [list zone operations](struct.ZoneOperationListCall.html) (response) /// * [list global operations](struct.GlobalOperationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationList { /// [Output Only] A token used to continue a truncate. #[serde(rename="nextPageToken")] @@ -2088,7 +2092,7 @@ impl ResponseResult for Network {} /// /// * [aggregated list disk types](struct.DiskTypeAggregatedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DiskTypeAggregatedList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -2148,7 +2152,7 @@ impl ResponseResult for InstanceTemplate {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HealthStatus { /// URL of the instance resource. pub instance: String, @@ -2174,7 +2178,7 @@ impl Part for HealthStatus {} /// /// * [aggregated list machine types](struct.MachineTypeAggregatedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MachineTypeAggregatedList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -2202,7 +2206,7 @@ impl ResponseResult for MachineTypeAggregatedList {} /// /// * [validate url maps](struct.UrlMapValidateCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UrlMapsValidateResponse { /// no description provided pub result: UrlMapValidationResult, @@ -2215,7 +2219,7 @@ impl ResponseResult for UrlMapsValidateResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ForwardingRulesScopedList { /// List of forwarding rules contained in this scope. #[serde(rename="forwardingRules")] @@ -2236,7 +2240,7 @@ impl Part for ForwardingRulesScopedList {} /// /// * [list routes](struct.RouteListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RouteList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -2337,7 +2341,7 @@ impl ResponseResult for Disk {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VpnTunnelsScopedListWarningData { /// [Output Only] A key for the warning data. pub key: String, @@ -2358,7 +2362,7 @@ impl Part for VpnTunnelsScopedListWarningData {} /// /// * [list target http proxies](struct.TargetHttpProxyListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetHttpProxyList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -2468,7 +2472,7 @@ impl RequestValue for DeprecationStatus {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DisksScopedListWarning { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -2491,7 +2495,7 @@ impl Part for DisksScopedListWarning {} /// /// * [list target vpn gateways](struct.TargetVpnGatewayListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetVpnGatewayList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -2520,7 +2524,7 @@ impl ResponseResult for TargetVpnGatewayList {} /// * [list zones](struct.ZoneListCall.html) (none) /// * [get zones](struct.ZoneGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Zone { /// [Output Only] Status of the zone, either UP or DOWN. pub status: String, @@ -2652,7 +2656,7 @@ impl RequestValue for UrlMapReference {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MachineTypeScratchDisks { /// Size of the scratch disk, defined in GB. #[serde(rename="diskGb")] @@ -2672,7 +2676,7 @@ impl Part for MachineTypeScratchDisks {} /// /// * [aggregated list target instances](struct.TargetInstanceAggregatedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetInstanceAggregatedList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -2717,7 +2721,7 @@ impl RequestValue for UsageExportLocation {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AddressesScopedListWarning { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -2754,7 +2758,7 @@ impl Part for HealthCheckReference {} /// /// * [get health target pools](struct.TargetPoolGetHealthCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetPoolInstanceHealth { /// Type of resource. pub kind: String, @@ -2822,7 +2826,7 @@ impl ResponseResult for TargetVpnGateway {} /// /// * [aggregated list instances](struct.InstanceAggregatedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstanceAggregatedList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -2863,7 +2867,7 @@ impl RequestValue for TargetPoolsAddInstanceRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationsScopedListWarning { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -2886,7 +2890,7 @@ impl Part for OperationsScopedListWarning {} /// /// * [get health backend services](struct.BackendServiceGetHealthCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BackendServiceGroupHealth { /// Type of resource. pub kind: String, @@ -2902,7 +2906,7 @@ impl ResponseResult for BackendServiceGroupHealth {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetVpnGatewaysScopedListWarning { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -3016,7 +3020,7 @@ impl Part for AttachedDiskInitializeParams {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ZoneMaintenanceWindows { /// [Output Only] Ending time of the maintenance window, in RFC3339 format. #[serde(rename="endTime")] @@ -3043,7 +3047,7 @@ impl Part for ZoneMaintenanceWindows {} /// /// * [list instances](struct.InstanceListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstanceList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -3132,7 +3136,7 @@ impl ResponseResult for TargetPool {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetPoolsScopedListWarningData { /// [Output Only] A key for the warning data. pub key: String, @@ -3148,7 +3152,7 @@ impl Part for TargetPoolsScopedListWarningData {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstancesScopedList { /// [Output Only] List of instances contained in this scope. pub instances: Vec, @@ -3205,7 +3209,7 @@ impl ResponseResult for Address {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationError { /// [Output Only] The array of errors encountered while processing this operation. pub errors: Vec, @@ -3262,7 +3266,7 @@ impl RequestValue for TargetPoolsAddHealthCheckRequest {} /// /// * [list networks](struct.NetworkListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct NetworkList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -3290,7 +3294,7 @@ impl ResponseResult for NetworkList {} /// /// * [list zones](struct.ZoneListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ZoneList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -3313,7 +3317,7 @@ impl ResponseResult for ZoneList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MachineTypesScopedListWarning { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -3354,7 +3358,7 @@ impl RequestValue for InstanceReference {} /// /// * [list instance templates](struct.InstanceTemplateListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstanceTemplateList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -3382,7 +3386,7 @@ impl ResponseResult for InstanceTemplateList {} /// /// * [list target instances](struct.TargetInstanceListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetInstanceList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -3410,7 +3414,7 @@ impl ResponseResult for TargetInstanceList {} /// /// * [list http health checks](struct.HttpHealthCheckListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HttpHealthCheckList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -3438,7 +3442,7 @@ impl ResponseResult for HttpHealthCheckList {} /// /// * [get licenses](struct.LicenseGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct License { /// If true, the customer will be charged license fee for running software that contains this license on an instance. #[serde(rename="chargesUseFee")] @@ -3506,7 +3510,7 @@ impl RequestValue for AttachedDisk {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Quota { /// [Output Only] Current usage of this metric. pub usage: f64, @@ -3584,7 +3588,7 @@ impl ResponseResult for Route {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetVpnGatewaysScopedList { /// [Output Only] List of target vpn gateways contained in this scope. #[serde(rename="targetVpnGateways")] @@ -3600,7 +3604,7 @@ impl Part for TargetVpnGatewaysScopedList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DiskTypesScopedListWarningData { /// [Output Only] A key for the warning data. pub key: String, @@ -3669,7 +3673,7 @@ impl Part for NetworkInterface {} /// /// * [aggregated list forwarding rules](struct.ForwardingRuleAggregatedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ForwardingRuleAggregatedList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -3692,7 +3696,7 @@ impl ResponseResult for ForwardingRuleAggregatedList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TestFailure { /// no description provided pub path: String, @@ -3718,7 +3722,7 @@ impl Part for TestFailure {} /// /// * [list vpn tunnels](struct.VpnTunnelListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VpnTunnelList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -3746,7 +3750,7 @@ impl ResponseResult for VpnTunnelList {} /// /// * [aggregated list target pools](struct.TargetPoolAggregatedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetPoolAggregatedList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -3769,7 +3773,7 @@ impl ResponseResult for TargetPoolAggregatedList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetInstancesScopedList { /// List of target instances contained in this scope. #[serde(rename="targetInstances")] @@ -3931,7 +3935,7 @@ impl Part for RouteWarningsData {} /// * [delete routes](struct.RouteDeleteCall.html) (response) /// * [patch url maps](struct.UrlMapPatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { /// [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE. pub status: String, @@ -4021,7 +4025,7 @@ impl RequestValue for TargetPoolsRemoveInstanceRequest {} /// /// * [list target pools](struct.TargetPoolListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetPoolList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -4096,7 +4100,7 @@ impl RequestValue for TargetPoolsRemoveHealthCheckRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DisksScopedList { /// [Output Only] List of disks contained in this scope. pub disks: Vec, @@ -4111,7 +4115,7 @@ impl Part for DisksScopedList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VpnTunnelsScopedListWarning { /// [Output Only] Optional human-readable details for this warning. pub message: String, @@ -4197,7 +4201,7 @@ impl ResponseResult for Image {} /// /// * [list disks](struct.DiskListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DiskList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -4240,7 +4244,7 @@ impl Part for ImageRawDisk {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationsScopedListWarningData { /// [Output Only] A key for the warning data. pub key: String, @@ -4261,7 +4265,7 @@ impl Part for OperationsScopedListWarningData {} /// /// * [list backend services](struct.BackendServiceListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BackendServiceList { /// A token used to continue a truncated list request (output only). #[serde(rename="nextPageToken")] @@ -4284,7 +4288,7 @@ impl ResponseResult for BackendServiceList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AddressesScopedListWarningData { /// [Output Only] A key for the warning data. pub key: String, @@ -4300,7 +4304,7 @@ impl Part for AddressesScopedListWarningData {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationErrorErrors { /// [Output Only] An optional, human-readable error message. pub message: String, @@ -4358,7 +4362,7 @@ impl RequestValue for Scheduling {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetPoolsScopedList { /// Informational warning which replaces the list of addresses when the list is empty. pub warning: TargetPoolsScopedListWarning, @@ -4379,7 +4383,7 @@ impl Part for TargetPoolsScopedList {} /// /// * [list regions](struct.RegionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RegionList { /// [Output Only] A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -8799,43 +8803,42 @@ impl<'a, C, A> DiskDeleteCall<'a, C, A> where C: BorrowMut, A: oa } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskDeleteCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the persistent disk to delete. + /// /// Sets the *disk* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the persistent disk to delete. pub fn disk(mut self, new_value: &str) -> DiskDeleteCall<'a, C, A> { self._disk = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DiskDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8865,8 +8868,8 @@ impl<'a, C, A> DiskDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9065,47 +9068,43 @@ impl<'a, C, A> DiskAggregatedListCall<'a, C, A> where C: BorrowMut DiskAggregatedListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DiskAggregatedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> DiskAggregatedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> DiskAggregatedListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DiskAggregatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9135,8 +9134,8 @@ impl<'a, C, A> DiskAggregatedListCall<'a, C, A> where C: BorrowMut DiskListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskListCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DiskListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> DiskListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> DiskListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DiskListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9417,8 +9412,8 @@ impl<'a, C, A> DiskListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9624,50 +9619,48 @@ impl<'a, C, A> DiskInsertCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Disk) -> DiskInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskInsertCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskInsertCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *source image* query property to the given value. - /// - /// /// Optional. Source image to restore onto a disk. + /// + /// Sets the *source image* query property to the given value. pub fn source_image(mut self, new_value: &str) -> DiskInsertCall<'a, C, A> { self._source_image = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DiskInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9697,8 +9690,8 @@ impl<'a, C, A> DiskInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9901,52 +9894,51 @@ impl<'a, C, A> DiskCreateSnapshotCall<'a, C, A> where C: BorrowMut DiskCreateSnapshotCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskCreateSnapshotCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskCreateSnapshotCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the persistent disk to snapshot. + /// /// Sets the *disk* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the persistent disk to snapshot. pub fn disk(mut self, new_value: &str) -> DiskCreateSnapshotCall<'a, C, A> { self._disk = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DiskCreateSnapshotCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9976,8 +9968,8 @@ impl<'a, C, A> DiskCreateSnapshotCall<'a, C, A> where C: BorrowMut DiskGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskGetCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the persistent disk to return. + /// /// Sets the *disk* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the persistent disk to return. pub fn disk(mut self, new_value: &str) -> DiskGetCall<'a, C, A> { self._disk = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DiskGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10231,8 +10222,8 @@ impl<'a, C, A> DiskGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10433,57 +10424,53 @@ impl<'a, C, A> AddresseListCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> AddresseListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> AddresseListCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AddresseListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AddresseListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> AddresseListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AddresseListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10513,8 +10500,8 @@ impl<'a, C, A> AddresseListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10713,47 +10700,43 @@ impl<'a, C, A> AddresseAggregatedListCall<'a, C, A> where C: BorrowMut AddresseAggregatedListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AddresseAggregatedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AddresseAggregatedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> AddresseAggregatedListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AddresseAggregatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10783,8 +10766,8 @@ impl<'a, C, A> AddresseAggregatedListCall<'a, C, A> where C: BorrowMut AddresseGetCall<'a, C, A> where C: BorrowMut, A: o } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> AddresseGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> AddresseGetCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the address resource to return. + /// /// Sets the *address* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the address resource to return. pub fn address(mut self, new_value: &str) -> AddresseGetCall<'a, C, A> { self._address = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AddresseGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11038,8 +11020,8 @@ impl<'a, C, A> AddresseGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11240,42 +11222,41 @@ impl<'a, C, A> AddresseInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Address) -> AddresseInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> AddresseInsertCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> AddresseInsertCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AddresseInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11305,8 +11286,8 @@ impl<'a, C, A> AddresseInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11494,43 +11475,42 @@ impl<'a, C, A> AddresseDeleteCall<'a, C, A> where C: BorrowMut, A } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> AddresseDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> AddresseDeleteCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the address resource to delete. + /// /// Sets the *address* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the address resource to delete. pub fn address(mut self, new_value: &str) -> AddresseDeleteCall<'a, C, A> { self._address = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AddresseDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11560,8 +11540,8 @@ impl<'a, C, A> AddresseDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11760,32 +11740,31 @@ impl<'a, C, A> UrlMapInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &UrlMap) -> UrlMapInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UrlMapInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11815,8 +11794,8 @@ impl<'a, C, A> UrlMapInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12002,33 +11981,32 @@ impl<'a, C, A> UrlMapGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the UrlMap resource to return. + /// /// Sets the *url map* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the UrlMap resource to return. pub fn url_map(mut self, new_value: &str) -> UrlMapGetCall<'a, C, A> { self._url_map = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UrlMapGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12058,8 +12036,8 @@ impl<'a, C, A> UrlMapGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12260,42 +12238,41 @@ impl<'a, C, A> UrlMapValidateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &UrlMapsValidateRequest) -> UrlMapValidateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapValidateCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the UrlMap resource to be validated as. + /// /// Sets the *url map* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the UrlMap resource to be validated as. pub fn url_map(mut self, new_value: &str) -> UrlMapValidateCall<'a, C, A> { self._url_map = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UrlMapValidateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12325,8 +12302,8 @@ impl<'a, C, A> UrlMapValidateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12525,47 +12502,43 @@ impl<'a, C, A> UrlMapListCall<'a, C, A> where C: BorrowMut, A: oa } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> UrlMapListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> UrlMapListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> UrlMapListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UrlMapListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12595,8 +12568,8 @@ impl<'a, C, A> UrlMapListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12797,42 +12770,41 @@ impl<'a, C, A> UrlMapPatchCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &UrlMap) -> UrlMapPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapPatchCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the UrlMap resource to update. + /// /// Sets the *url map* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the UrlMap resource to update. pub fn url_map(mut self, new_value: &str) -> UrlMapPatchCall<'a, C, A> { self._url_map = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UrlMapPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12862,8 +12834,8 @@ impl<'a, C, A> UrlMapPatchCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13064,42 +13036,41 @@ impl<'a, C, A> UrlMapUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &UrlMap) -> UrlMapUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapUpdateCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the UrlMap resource to update. + /// /// Sets the *url map* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the UrlMap resource to update. pub fn url_map(mut self, new_value: &str) -> UrlMapUpdateCall<'a, C, A> { self._url_map = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UrlMapUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13129,8 +13100,8 @@ impl<'a, C, A> UrlMapUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13316,33 +13287,32 @@ impl<'a, C, A> UrlMapDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the UrlMap resource to delete. + /// /// Sets the *url map* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the UrlMap resource to delete. pub fn url_map(mut self, new_value: &str) -> UrlMapDeleteCall<'a, C, A> { self._url_map = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UrlMapDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13372,8 +13342,8 @@ impl<'a, C, A> UrlMapDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13572,32 +13542,31 @@ impl<'a, C, A> GlobalAddresseInsertCall<'a, C, A> where C: BorrowMut GlobalAddresseInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> GlobalAddresseInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalAddresseInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13627,8 +13596,8 @@ impl<'a, C, A> GlobalAddresseInsertCall<'a, C, A> where C: BorrowMut GlobalAddresseListCall<'a, C, A> where C: BorrowMut GlobalAddresseListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> GlobalAddresseListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> GlobalAddresseListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> GlobalAddresseListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalAddresseListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13897,8 +13862,8 @@ impl<'a, C, A> GlobalAddresseListCall<'a, C, A> where C: BorrowMut GlobalAddresseGetCall<'a, C, A> where C: BorrowMut } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> GlobalAddresseGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the address resource to return. + /// /// Sets the *address* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the address resource to return. pub fn address(mut self, new_value: &str) -> GlobalAddresseGetCall<'a, C, A> { self._address = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalAddresseGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14140,8 +14104,8 @@ impl<'a, C, A> GlobalAddresseGetCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14327,33 +14291,32 @@ impl<'a, C, A> GlobalAddresseDeleteCall<'a, C, A> where C: BorrowMut GlobalAddresseDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the address resource to delete. + /// /// Sets the *address* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the address resource to delete. pub fn address(mut self, new_value: &str) -> GlobalAddresseDeleteCall<'a, C, A> { self._address = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalAddresseDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14383,8 +14346,8 @@ impl<'a, C, A> GlobalAddresseDeleteCall<'a, C, A> where C: BorrowMut SnapshotGetCall<'a, C, A> where C: BorrowMut, A: o } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> SnapshotGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the persistent disk snapshot resource to return. + /// /// Sets the *snapshot* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the persistent disk snapshot resource to return. pub fn snapshot(mut self, new_value: &str) -> SnapshotGetCall<'a, C, A> { self._snapshot = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SnapshotGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14626,8 +14588,8 @@ impl<'a, C, A> SnapshotGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14826,47 +14788,43 @@ impl<'a, C, A> SnapshotListCall<'a, C, A> where C: BorrowMut, A: } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> SnapshotListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> SnapshotListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> SnapshotListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> SnapshotListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SnapshotListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14896,8 +14854,8 @@ impl<'a, C, A> SnapshotListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15083,33 +15041,32 @@ impl<'a, C, A> SnapshotDeleteCall<'a, C, A> where C: BorrowMut, A } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> SnapshotDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the persistent disk snapshot resource to delete. + /// /// Sets the *snapshot* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the persistent disk snapshot resource to delete. pub fn snapshot(mut self, new_value: &str) -> SnapshotDeleteCall<'a, C, A> { self._snapshot = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SnapshotDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15139,8 +15096,8 @@ impl<'a, C, A> SnapshotDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15328,43 +15285,42 @@ impl<'a, C, A> DiskTypeGetCall<'a, C, A> where C: BorrowMut, A: o } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskTypeGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskTypeGetCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the disk type resource to return. + /// /// Sets the *disk type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the disk type resource to return. pub fn disk_type(mut self, new_value: &str) -> DiskTypeGetCall<'a, C, A> { self._disk_type = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DiskTypeGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15394,8 +15350,8 @@ impl<'a, C, A> DiskTypeGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15594,47 +15550,43 @@ impl<'a, C, A> DiskTypeAggregatedListCall<'a, C, A> where C: BorrowMut DiskTypeAggregatedListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DiskTypeAggregatedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> DiskTypeAggregatedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> DiskTypeAggregatedListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DiskTypeAggregatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15664,8 +15616,8 @@ impl<'a, C, A> DiskTypeAggregatedListCall<'a, C, A> where C: BorrowMut DiskTypeListCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskTypeListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskTypeListCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DiskTypeListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> DiskTypeListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> DiskTypeListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DiskTypeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15946,8 +15894,8 @@ impl<'a, C, A> DiskTypeListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16133,33 +16081,32 @@ impl<'a, C, A> ZoneGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ZoneGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the zone resource to return. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the zone resource to return. pub fn zone(mut self, new_value: &str) -> ZoneGetCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ZoneGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16189,8 +16136,8 @@ impl<'a, C, A> ZoneGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16389,47 +16336,43 @@ impl<'a, C, A> ZoneListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ZoneListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ZoneListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ZoneListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> ZoneListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ZoneListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16459,8 +16402,8 @@ impl<'a, C, A> ZoneListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16663,52 +16606,51 @@ impl<'a, C, A> InstanceSetSchedulingCall<'a, C, A> where C: BorrowMut InstanceSetSchedulingCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceSetSchedulingCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceSetSchedulingCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Instance name. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Instance name. pub fn instance(mut self, new_value: &str) -> InstanceSetSchedulingCall<'a, C, A> { self._instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceSetSchedulingCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16738,8 +16680,8 @@ impl<'a, C, A> InstanceSetSchedulingCall<'a, C, A> where C: BorrowMut InstanceDeleteCall<'a, C, A> where C: BorrowMut, A } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceDeleteCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the instance resource to delete. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the instance resource to delete. pub fn instance(mut self, new_value: &str) -> InstanceDeleteCall<'a, C, A> { self._instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16993,8 +16934,8 @@ impl<'a, C, A> InstanceDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17182,43 +17123,42 @@ impl<'a, C, A> InstanceGetSerialPortOutputCall<'a, C, A> where C: BorrowMut InstanceGetSerialPortOutputCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceGetSerialPortOutputCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the instance scoping this request. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the instance scoping this request. pub fn instance(mut self, new_value: &str) -> InstanceGetSerialPortOutputCall<'a, C, A> { self._instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceGetSerialPortOutputCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17248,8 +17188,8 @@ impl<'a, C, A> InstanceGetSerialPortOutputCall<'a, C, A> where C: BorrowMut InstanceSetDiskAutoDeleteCall<'a, C, A> where C: BorrowMut InstanceSetDiskAutoDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceSetDiskAutoDeleteCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// The instance name. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The instance name. pub fn instance(mut self, new_value: &str) -> InstanceSetDiskAutoDeleteCall<'a, C, A> { self._instance = new_value.to_string(); self } + /// Whether to auto-delete the disk when the instance is deleted. + /// /// Sets the *auto delete* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Whether to auto-delete the disk when the instance is deleted. pub fn auto_delete(mut self, new_value: bool) -> InstanceSetDiskAutoDeleteCall<'a, C, A> { self._auto_delete = new_value; self } + /// The device name of the disk to modify. + /// /// Sets the *device name* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The device name of the disk to modify. pub fn device_name(mut self, new_value: &str) -> InstanceSetDiskAutoDeleteCall<'a, C, A> { self._device_name = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceSetDiskAutoDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17527,8 +17466,8 @@ impl<'a, C, A> InstanceSetDiskAutoDeleteCall<'a, C, A> where C: BorrowMut InstanceAddAccessConfigCall<'a, C, A> where C: BorrowMut InstanceAddAccessConfigCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceAddAccessConfigCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceAddAccessConfigCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// The instance name for this request. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The instance name for this request. pub fn instance(mut self, new_value: &str) -> InstanceAddAccessConfigCall<'a, C, A> { self._instance = new_value.to_string(); self } + /// The name of the network interface to add to this instance. + /// /// Sets the *network interface* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the network interface to add to this instance. pub fn network_interface(mut self, new_value: &str) -> InstanceAddAccessConfigCall<'a, C, A> { self._network_interface = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceAddAccessConfigCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17818,8 +17756,8 @@ impl<'a, C, A> InstanceAddAccessConfigCall<'a, C, A> where C: BorrowMut InstanceStartCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceStartCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceStartCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the instance resource to start. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the instance resource to start. pub fn instance(mut self, new_value: &str) -> InstanceStartCall<'a, C, A> { self._instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceStartCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18073,8 +18010,8 @@ impl<'a, C, A> InstanceStartCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18262,43 +18199,42 @@ impl<'a, C, A> InstanceGetCall<'a, C, A> where C: BorrowMut, A: o } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the The name of the zone for this request.. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the The name of the zone for this request.. pub fn zone(mut self, new_value: &str) -> InstanceGetCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the instance resource to return. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the instance resource to return. pub fn instance(mut self, new_value: &str) -> InstanceGetCall<'a, C, A> { self._instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18328,8 +18264,8 @@ impl<'a, C, A> InstanceGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18532,52 +18468,51 @@ impl<'a, C, A> InstanceSetTagCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Tags) -> InstanceSetTagCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceSetTagCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceSetTagCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the instance scoping this request. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the instance scoping this request. pub fn instance(mut self, new_value: &str) -> InstanceSetTagCall<'a, C, A> { self._instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceSetTagCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18607,8 +18542,8 @@ impl<'a, C, A> InstanceSetTagCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18811,52 +18746,51 @@ impl<'a, C, A> InstanceSetMetadataCall<'a, C, A> where C: BorrowMut InstanceSetMetadataCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceSetMetadataCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceSetMetadataCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the instance scoping this request. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the instance scoping this request. pub fn instance(mut self, new_value: &str) -> InstanceSetMetadataCall<'a, C, A> { self._instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceSetMetadataCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18886,8 +18820,8 @@ impl<'a, C, A> InstanceSetMetadataCall<'a, C, A> where C: BorrowMut InstanceDetachDiskCall<'a, C, A> where C: BorrowMut InstanceDetachDiskCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceDetachDiskCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Instance name. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Instance name. pub fn instance(mut self, new_value: &str) -> InstanceDetachDiskCall<'a, C, A> { self._instance = new_value.to_string(); self } + /// Disk device name to detach. + /// /// Sets the *device name* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Disk device name to detach. pub fn device_name(mut self, new_value: &str) -> InstanceDetachDiskCall<'a, C, A> { self._device_name = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceDetachDiskCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19153,8 +19086,8 @@ impl<'a, C, A> InstanceDetachDiskCall<'a, C, A> where C: BorrowMut InstanceStopCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceStopCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceStopCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the instance resource to start. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the instance resource to start. pub fn instance(mut self, new_value: &str) -> InstanceStopCall<'a, C, A> { self._instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceStopCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19408,8 +19340,8 @@ impl<'a, C, A> InstanceStopCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -19610,42 +19542,41 @@ impl<'a, C, A> InstanceInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Instance) -> InstanceInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceInsertCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceInsertCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19675,8 +19606,8 @@ impl<'a, C, A> InstanceInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -19864,43 +19795,42 @@ impl<'a, C, A> InstanceResetCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceResetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceResetCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the instance scoping this request. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the instance scoping this request. pub fn instance(mut self, new_value: &str) -> InstanceResetCall<'a, C, A> { self._instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceResetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19930,8 +19860,8 @@ impl<'a, C, A> InstanceResetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -20123,63 +20053,62 @@ impl<'a, C, A> InstanceDeleteAccessConfigCall<'a, C, A> where C: BorrowMut InstanceDeleteAccessConfigCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceDeleteAccessConfigCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// The instance name for this request. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The instance name for this request. pub fn instance(mut self, new_value: &str) -> InstanceDeleteAccessConfigCall<'a, C, A> { self._instance = new_value.to_string(); self } + /// The name of the access config to delete. + /// /// Sets the *access config* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the access config to delete. pub fn access_config(mut self, new_value: &str) -> InstanceDeleteAccessConfigCall<'a, C, A> { self._access_config = new_value.to_string(); self } + /// The name of the network interface. + /// /// Sets the *network interface* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the network interface. pub fn network_interface(mut self, new_value: &str) -> InstanceDeleteAccessConfigCall<'a, C, A> { self._network_interface = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceDeleteAccessConfigCall<'a, C, A> { self._delegate = Some(new_value); self @@ -20209,8 +20138,8 @@ impl<'a, C, A> InstanceDeleteAccessConfigCall<'a, C, A> where C: BorrowMut InstanceAttachDiskCall<'a, C, A> where C: BorrowMut InstanceAttachDiskCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceAttachDiskCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceAttachDiskCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Instance name. + /// /// Sets the *instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Instance name. pub fn instance(mut self, new_value: &str) -> InstanceAttachDiskCall<'a, C, A> { self._instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceAttachDiskCall<'a, C, A> { self._delegate = Some(new_value); self @@ -20488,8 +20416,8 @@ impl<'a, C, A> InstanceAttachDiskCall<'a, C, A> where C: BorrowMut InstanceListCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceListCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> InstanceListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> InstanceListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> InstanceListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -20770,8 +20694,8 @@ impl<'a, C, A> InstanceListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -20968,47 +20892,43 @@ impl<'a, C, A> InstanceAggregatedListCall<'a, C, A> where C: BorrowMut InstanceAggregatedListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> InstanceAggregatedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> InstanceAggregatedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> InstanceAggregatedListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceAggregatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21038,8 +20958,8 @@ impl<'a, C, A> InstanceAggregatedListCall<'a, C, A> where C: BorrowMut BackendServiceGetHealthCall<'a, C, A> where C: BorrowMut BackendServiceGetHealthCall<'a, C, A> { self._request = new_value.clone(); self } + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn project(mut self, new_value: &str) -> BackendServiceGetHealthCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the BackendService resource to which the queried instance belongs. + /// /// Sets the *backend service* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the BackendService resource to which the queried instance belongs. pub fn backend_service(mut self, new_value: &str) -> BackendServiceGetHealthCall<'a, C, A> { self._backend_service = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BackendServiceGetHealthCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21304,8 +21223,8 @@ impl<'a, C, A> BackendServiceGetHealthCall<'a, C, A> where C: BorrowMut BackendServiceDeleteCall<'a, C, A> where C: BorrowMut BackendServiceDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the BackendService resource to delete. + /// /// Sets the *backend service* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the BackendService resource to delete. pub fn backend_service(mut self, new_value: &str) -> BackendServiceDeleteCall<'a, C, A> { self._backend_service = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BackendServiceDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21547,8 +21465,8 @@ impl<'a, C, A> BackendServiceDeleteCall<'a, C, A> where C: BorrowMut BackendServiceGetCall<'a, C, A> where C: BorrowMut } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> BackendServiceGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the BackendService resource to return. + /// /// Sets the *backend service* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the BackendService resource to return. pub fn backend_service(mut self, new_value: &str) -> BackendServiceGetCall<'a, C, A> { self._backend_service = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BackendServiceGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21790,8 +21707,8 @@ impl<'a, C, A> BackendServiceGetCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -21992,42 +21909,41 @@ impl<'a, C, A> BackendServiceUpdateCall<'a, C, A> where C: BorrowMut BackendServiceUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> BackendServiceUpdateCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the BackendService resource to update. + /// /// Sets the *backend service* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the BackendService resource to update. pub fn backend_service(mut self, new_value: &str) -> BackendServiceUpdateCall<'a, C, A> { self._backend_service = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BackendServiceUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22057,8 +21973,8 @@ impl<'a, C, A> BackendServiceUpdateCall<'a, C, A> where C: BorrowMut BackendServiceListCall<'a, C, A> where C: BorrowMut BackendServiceListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> BackendServiceListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> BackendServiceListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> BackendServiceListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BackendServiceListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22327,8 +22239,8 @@ impl<'a, C, A> BackendServiceListCall<'a, C, A> where C: BorrowMut BackendServicePatchCall<'a, C, A> where C: BorrowMut BackendServicePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> BackendServicePatchCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the BackendService resource to update. + /// /// Sets the *backend service* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the BackendService resource to update. pub fn backend_service(mut self, new_value: &str) -> BackendServicePatchCall<'a, C, A> { self._backend_service = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BackendServicePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22594,8 +22505,8 @@ impl<'a, C, A> BackendServicePatchCall<'a, C, A> where C: BorrowMut BackendServiceInsertCall<'a, C, A> where C: BorrowMut BackendServiceInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> BackendServiceInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BackendServiceInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22849,8 +22759,8 @@ impl<'a, C, A> BackendServiceInsertCall<'a, C, A> where C: BorrowMut LicenseGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> LicenseGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the license resource to return. + /// /// Sets the *license* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the license resource to return. pub fn license(mut self, new_value: &str) -> LicenseGetCall<'a, C, A> { self._license = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LicenseGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23092,8 +23001,8 @@ impl<'a, C, A> LicenseGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -23292,32 +23201,31 @@ impl<'a, C, A> NetworkInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Network) -> NetworkInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> NetworkInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> NetworkInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23347,8 +23255,8 @@ impl<'a, C, A> NetworkInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -23547,47 +23455,43 @@ impl<'a, C, A> NetworkListCall<'a, C, A> where C: BorrowMut, A: o } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> NetworkListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> NetworkListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> NetworkListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> NetworkListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> NetworkListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23617,8 +23521,8 @@ impl<'a, C, A> NetworkListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -23804,33 +23708,32 @@ impl<'a, C, A> NetworkDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> NetworkDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the network resource to delete. + /// /// Sets the *network* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the network resource to delete. pub fn network(mut self, new_value: &str) -> NetworkDeleteCall<'a, C, A> { self._network = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> NetworkDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23860,8 +23763,8 @@ impl<'a, C, A> NetworkDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -24047,33 +23950,32 @@ impl<'a, C, A> NetworkGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> NetworkGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the network resource to return. + /// /// Sets the *network* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the network resource to return. pub fn network(mut self, new_value: &str) -> NetworkGetCall<'a, C, A> { self._network = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> NetworkGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -24103,8 +24005,8 @@ impl<'a, C, A> NetworkGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -24303,47 +24205,43 @@ impl<'a, C, A> GlobalOperationListCall<'a, C, A> where C: BorrowMut GlobalOperationListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> GlobalOperationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> GlobalOperationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> GlobalOperationListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalOperationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -24373,8 +24271,8 @@ impl<'a, C, A> GlobalOperationListCall<'a, C, A> where C: BorrowMut GlobalOperationGetCall<'a, C, A> where C: BorrowMut GlobalOperationGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the operation resource to return. + /// /// Sets the *operation* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the operation resource to return. pub fn operation(mut self, new_value: &str) -> GlobalOperationGetCall<'a, C, A> { self._operation = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalOperationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -24616,8 +24513,8 @@ impl<'a, C, A> GlobalOperationGetCall<'a, C, A> where C: BorrowMut GlobalOperationDeleteCall<'a, C, A> where C: BorrowMut GlobalOperationDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the operation resource to delete. + /// /// Sets the *operation* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the operation resource to delete. pub fn operation(mut self, new_value: &str) -> GlobalOperationDeleteCall<'a, C, A> { self._operation = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalOperationDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -24848,8 +24744,8 @@ impl<'a, C, A> GlobalOperationDeleteCall<'a, C, A> where C: BorrowMut GlobalOperationAggregatedListCall<'a, C, A> where C: BorrowMut GlobalOperationAggregatedListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> GlobalOperationAggregatedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> GlobalOperationAggregatedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> GlobalOperationAggregatedListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalOperationAggregatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -25118,8 +25010,8 @@ impl<'a, C, A> GlobalOperationAggregatedListCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> RegionListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> RegionListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> RegionListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> RegionListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RegionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -25388,8 +25276,8 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -25575,33 +25463,32 @@ impl<'a, C, A> RegionGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> RegionGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region resource to return. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region resource to return. pub fn region(mut self, new_value: &str) -> RegionGetCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RegionGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -25631,8 +25518,8 @@ impl<'a, C, A> RegionGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -25831,47 +25718,43 @@ impl<'a, C, A> ForwardingRuleAggregatedListCall<'a, C, A> where C: BorrowMut ForwardingRuleAggregatedListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ForwardingRuleAggregatedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ForwardingRuleAggregatedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> ForwardingRuleAggregatedListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ForwardingRuleAggregatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -25901,8 +25784,8 @@ impl<'a, C, A> ForwardingRuleAggregatedListCall<'a, C, A> where C: BorrowMut ForwardingRuleInsertCall<'a, C, A> where C: BorrowMut ForwardingRuleInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> ForwardingRuleInsertCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> ForwardingRuleInsertCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ForwardingRuleInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -26168,8 +26050,8 @@ impl<'a, C, A> ForwardingRuleInsertCall<'a, C, A> where C: BorrowMut ForwardingRuleSetTargetCall<'a, C, A> where C: BorrowMut ForwardingRuleSetTargetCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> ForwardingRuleSetTargetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> ForwardingRuleSetTargetCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the ForwardingRule resource in which target is to be set. + /// /// Sets the *forwarding rule* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the ForwardingRule resource in which target is to be set. pub fn forwarding_rule(mut self, new_value: &str) -> ForwardingRuleSetTargetCall<'a, C, A> { self._forwarding_rule = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ForwardingRuleSetTargetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -26447,8 +26328,8 @@ impl<'a, C, A> ForwardingRuleSetTargetCall<'a, C, A> where C: BorrowMut ForwardingRuleGetCall<'a, C, A> where C: BorrowMut } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> ForwardingRuleGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> ForwardingRuleGetCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the ForwardingRule resource to return. + /// /// Sets the *forwarding rule* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the ForwardingRule resource to return. pub fn forwarding_rule(mut self, new_value: &str) -> ForwardingRuleGetCall<'a, C, A> { self._forwarding_rule = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ForwardingRuleGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -26702,8 +26582,8 @@ impl<'a, C, A> ForwardingRuleGetCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -26904,57 +26784,53 @@ impl<'a, C, A> ForwardingRuleListCall<'a, C, A> where C: BorrowMut ForwardingRuleListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> ForwardingRuleListCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ForwardingRuleListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ForwardingRuleListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> ForwardingRuleListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ForwardingRuleListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -26984,8 +26860,8 @@ impl<'a, C, A> ForwardingRuleListCall<'a, C, A> where C: BorrowMut ForwardingRuleDeleteCall<'a, C, A> where C: BorrowMut ForwardingRuleDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> ForwardingRuleDeleteCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the ForwardingRule resource to delete. + /// /// Sets the *forwarding rule* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the ForwardingRule resource to delete. pub fn forwarding_rule(mut self, new_value: &str) -> ForwardingRuleDeleteCall<'a, C, A> { self._forwarding_rule = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ForwardingRuleDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -27239,8 +27114,8 @@ impl<'a, C, A> ForwardingRuleDeleteCall<'a, C, A> where C: BorrowMut TargetPoolListCall<'a, C, A> where C: BorrowMut, A } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetPoolListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolListCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TargetPoolListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TargetPoolListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> TargetPoolListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetPoolListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -27521,8 +27392,8 @@ impl<'a, C, A> TargetPoolListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -27725,51 +27596,50 @@ impl<'a, C, A> TargetPoolAddHealthCheckCall<'a, C, A> where C: BorrowMut TargetPoolAddHealthCheckCall<'a, C, A> { self._request = new_value.clone(); self } + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn project(mut self, new_value: &str) -> TargetPoolAddHealthCheckCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolAddHealthCheckCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the TargetPool resource to which health_check_url is to be added. + /// /// Sets the *target pool* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetPool resource to which health_check_url is to be added. pub fn target_pool(mut self, new_value: &str) -> TargetPoolAddHealthCheckCall<'a, C, A> { self._target_pool = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetPoolAddHealthCheckCall<'a, C, A> { self._delegate = Some(new_value); self @@ -27799,8 +27669,8 @@ impl<'a, C, A> TargetPoolAddHealthCheckCall<'a, C, A> where C: BorrowMut TargetPoolInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &TargetPool) -> TargetPoolInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetPoolInsertCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolInsertCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetPoolInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -28066,8 +27935,8 @@ impl<'a, C, A> TargetPoolInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -28270,51 +28139,50 @@ impl<'a, C, A> TargetPoolRemoveHealthCheckCall<'a, C, A> where C: BorrowMut TargetPoolRemoveHealthCheckCall<'a, C, A> { self._request = new_value.clone(); self } + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn project(mut self, new_value: &str) -> TargetPoolRemoveHealthCheckCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolRemoveHealthCheckCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the TargetPool resource to which health_check_url is to be removed. + /// /// Sets the *target pool* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetPool resource to which health_check_url is to be removed. pub fn target_pool(mut self, new_value: &str) -> TargetPoolRemoveHealthCheckCall<'a, C, A> { self._target_pool = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetPoolRemoveHealthCheckCall<'a, C, A> { self._delegate = Some(new_value); self @@ -28344,8 +28212,8 @@ impl<'a, C, A> TargetPoolRemoveHealthCheckCall<'a, C, A> where C: BorrowMut TargetPoolGetHealthCall<'a, C, A> where C: BorrowMut TargetPoolGetHealthCall<'a, C, A> { self._request = new_value.clone(); self } + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn project(mut self, new_value: &str) -> TargetPoolGetHealthCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolGetHealthCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the TargetPool resource to which the queried instance belongs. + /// /// Sets the *target pool* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetPool resource to which the queried instance belongs. pub fn target_pool(mut self, new_value: &str) -> TargetPoolGetHealthCall<'a, C, A> { self._target_pool = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetPoolGetHealthCall<'a, C, A> { self._delegate = Some(new_value); self @@ -28622,8 +28489,8 @@ impl<'a, C, A> TargetPoolGetHealthCall<'a, C, A> where C: BorrowMut TargetPoolSetBackupCall<'a, C, A> where C: BorrowMut TargetPoolSetBackupCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetPoolSetBackupCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolSetBackupCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the TargetPool resource for which the backup is to be set. + /// /// Sets the *target pool* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetPool resource for which the backup is to be set. pub fn target_pool(mut self, new_value: &str) -> TargetPoolSetBackupCall<'a, C, A> { self._target_pool = new_value.to_string(); self } - /// Sets the *failover ratio* query property to the given value. - /// - /// /// New failoverRatio value for the containing target pool. + /// + /// Sets the *failover ratio* query property to the given value. pub fn failover_ratio(mut self, new_value: f32) -> TargetPoolSetBackupCall<'a, C, A> { self._failover_ratio = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetPoolSetBackupCall<'a, C, A> { self._delegate = Some(new_value); self @@ -28914,8 +28779,8 @@ impl<'a, C, A> TargetPoolSetBackupCall<'a, C, A> where C: BorrowMut TargetPoolAggregatedListCall<'a, C, A> where C: BorrowMut TargetPoolAggregatedListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TargetPoolAggregatedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TargetPoolAggregatedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> TargetPoolAggregatedListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetPoolAggregatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -29184,8 +29045,8 @@ impl<'a, C, A> TargetPoolAggregatedListCall<'a, C, A> where C: BorrowMut TargetPoolGetCall<'a, C, A> where C: BorrowMut, A: } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetPoolGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolGetCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the TargetPool resource to return. + /// /// Sets the *target pool* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetPool resource to return. pub fn target_pool(mut self, new_value: &str) -> TargetPoolGetCall<'a, C, A> { self._target_pool = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetPoolGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -29439,8 +29299,8 @@ impl<'a, C, A> TargetPoolGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -29643,51 +29503,50 @@ impl<'a, C, A> TargetPoolAddInstanceCall<'a, C, A> where C: BorrowMut TargetPoolAddInstanceCall<'a, C, A> { self._request = new_value.clone(); self } + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn project(mut self, new_value: &str) -> TargetPoolAddInstanceCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolAddInstanceCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the TargetPool resource to which instance_url is to be added. + /// /// Sets the *target pool* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetPool resource to which instance_url is to be added. pub fn target_pool(mut self, new_value: &str) -> TargetPoolAddInstanceCall<'a, C, A> { self._target_pool = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetPoolAddInstanceCall<'a, C, A> { self._delegate = Some(new_value); self @@ -29717,8 +29576,8 @@ impl<'a, C, A> TargetPoolAddInstanceCall<'a, C, A> where C: BorrowMut TargetPoolRemoveInstanceCall<'a, C, A> where C: BorrowMut TargetPoolRemoveInstanceCall<'a, C, A> { self._request = new_value.clone(); self } + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn project(mut self, new_value: &str) -> TargetPoolRemoveInstanceCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolRemoveInstanceCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the TargetPool resource to which instance_url is to be removed. + /// /// Sets the *target pool* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetPool resource to which instance_url is to be removed. pub fn target_pool(mut self, new_value: &str) -> TargetPoolRemoveInstanceCall<'a, C, A> { self._target_pool = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetPoolRemoveInstanceCall<'a, C, A> { self._delegate = Some(new_value); self @@ -29995,8 +29853,8 @@ impl<'a, C, A> TargetPoolRemoveInstanceCall<'a, C, A> where C: BorrowMut TargetPoolDeleteCall<'a, C, A> where C: BorrowMut, } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetPoolDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolDeleteCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the TargetPool resource to delete. + /// /// Sets the *target pool* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetPool resource to delete. pub fn target_pool(mut self, new_value: &str) -> TargetPoolDeleteCall<'a, C, A> { self._target_pool = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetPoolDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -30250,8 +30107,8 @@ impl<'a, C, A> TargetPoolDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -30452,57 +30309,53 @@ impl<'a, C, A> TargetInstanceListCall<'a, C, A> where C: BorrowMut TargetInstanceListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the zone scoping this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> TargetInstanceListCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TargetInstanceListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TargetInstanceListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> TargetInstanceListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetInstanceListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -30532,8 +30385,8 @@ impl<'a, C, A> TargetInstanceListCall<'a, C, A> where C: BorrowMut TargetInstanceInsertCall<'a, C, A> where C: BorrowMut TargetInstanceInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetInstanceInsertCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the zone scoping this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> TargetInstanceInsertCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetInstanceInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -30799,8 +30651,8 @@ impl<'a, C, A> TargetInstanceInsertCall<'a, C, A> where C: BorrowMut TargetInstanceAggregatedListCall<'a, C, A> where C: BorrowMut TargetInstanceAggregatedListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TargetInstanceAggregatedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TargetInstanceAggregatedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> TargetInstanceAggregatedListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetInstanceAggregatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -31069,8 +30917,8 @@ impl<'a, C, A> TargetInstanceAggregatedListCall<'a, C, A> where C: BorrowMut TargetInstanceGetCall<'a, C, A> where C: BorrowMut } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetInstanceGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the zone scoping this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> TargetInstanceGetCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the TargetInstance resource to return. + /// /// Sets the *target instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetInstance resource to return. pub fn target_instance(mut self, new_value: &str) -> TargetInstanceGetCall<'a, C, A> { self._target_instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetInstanceGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -31324,8 +31171,8 @@ impl<'a, C, A> TargetInstanceGetCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -31513,43 +31360,42 @@ impl<'a, C, A> TargetInstanceDeleteCall<'a, C, A> where C: BorrowMut TargetInstanceDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the zone scoping this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> TargetInstanceDeleteCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the TargetInstance resource to delete. + /// /// Sets the *target instance* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetInstance resource to delete. pub fn target_instance(mut self, new_value: &str) -> TargetInstanceDeleteCall<'a, C, A> { self._target_instance = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetInstanceDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -31579,8 +31425,8 @@ impl<'a, C, A> TargetInstanceDeleteCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleGetCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the ForwardingRule resource to return. + /// /// Sets the *forwarding rule* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the ForwardingRule resource to return. pub fn forwarding_rule(mut self, new_value: &str) -> GlobalForwardingRuleGetCall<'a, C, A> { self._forwarding_rule = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalForwardingRuleGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -31822,8 +31667,8 @@ impl<'a, C, A> GlobalForwardingRuleGetCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleDeleteCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the ForwardingRule resource to delete. + /// /// Sets the *forwarding rule* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the ForwardingRule resource to delete. pub fn forwarding_rule(mut self, new_value: &str) -> GlobalForwardingRuleDeleteCall<'a, C, A> { self._forwarding_rule = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalForwardingRuleDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -32065,8 +31909,8 @@ impl<'a, C, A> GlobalForwardingRuleDeleteCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleSetTargetCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleSetTargetCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> GlobalForwardingRuleSetTargetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the ForwardingRule resource in which target is to be set. + /// /// Sets the *forwarding rule* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the ForwardingRule resource in which target is to be set. pub fn forwarding_rule(mut self, new_value: &str) -> GlobalForwardingRuleSetTargetCall<'a, C, A> { self._forwarding_rule = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalForwardingRuleSetTargetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -32332,8 +32175,8 @@ impl<'a, C, A> GlobalForwardingRuleSetTargetCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleInsertCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> GlobalForwardingRuleInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalForwardingRuleInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -32587,8 +32429,8 @@ impl<'a, C, A> GlobalForwardingRuleInsertCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleListCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> GlobalForwardingRuleListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> GlobalForwardingRuleListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> GlobalForwardingRuleListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> GlobalForwardingRuleListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -32857,8 +32695,8 @@ impl<'a, C, A> GlobalForwardingRuleListCall<'a, C, A> where C: BorrowMut ImageListCall<'a, C, A> where C: BorrowMut, A: oau } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ImageListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ImageListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ImageListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> ImageListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ImageListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -33127,8 +32961,8 @@ impl<'a, C, A> ImageListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -33314,33 +33148,32 @@ impl<'a, C, A> ImageDeleteCall<'a, C, A> where C: BorrowMut, A: o } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ImageDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the image resource to delete. + /// /// Sets the *image* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the image resource to delete. pub fn image(mut self, new_value: &str) -> ImageDeleteCall<'a, C, A> { self._image = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ImageDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -33370,8 +33203,8 @@ impl<'a, C, A> ImageDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -33574,42 +33407,41 @@ impl<'a, C, A> ImageDeprecateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &DeprecationStatus) -> ImageDeprecateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ImageDeprecateCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Image name. + /// /// Sets the *image* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Image name. pub fn image(mut self, new_value: &str) -> ImageDeprecateCall<'a, C, A> { self._image = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ImageDeprecateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -33639,8 +33471,8 @@ impl<'a, C, A> ImageDeprecateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -33839,32 +33671,31 @@ impl<'a, C, A> ImageInsertCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Image) -> ImageInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ImageInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ImageInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -33894,8 +33725,8 @@ impl<'a, C, A> ImageInsertCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -34081,33 +33912,32 @@ impl<'a, C, A> ImageGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ImageGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the image resource to return. + /// /// Sets the *image* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the image resource to return. pub fn image(mut self, new_value: &str) -> ImageGetCall<'a, C, A> { self._image = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ImageGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -34137,8 +33967,8 @@ impl<'a, C, A> ImageGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -34337,47 +34167,43 @@ impl<'a, C, A> MachineTypeAggregatedListCall<'a, C, A> where C: BorrowMut MachineTypeAggregatedListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> MachineTypeAggregatedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> MachineTypeAggregatedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> MachineTypeAggregatedListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MachineTypeAggregatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -34407,8 +34233,8 @@ impl<'a, C, A> MachineTypeAggregatedListCall<'a, C, A> where C: BorrowMut MachineTypeGetCall<'a, C, A> where C: BorrowMut, A } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> MachineTypeGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> MachineTypeGetCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the machine type resource to return. + /// /// Sets the *machine type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the machine type resource to return. pub fn machine_type(mut self, new_value: &str) -> MachineTypeGetCall<'a, C, A> { self._machine_type = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MachineTypeGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -34662,8 +34487,8 @@ impl<'a, C, A> MachineTypeGetCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -34864,57 +34689,53 @@ impl<'a, C, A> MachineTypeListCall<'a, C, A> where C: BorrowMut, } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> MachineTypeListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the zone for this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> MachineTypeListCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> MachineTypeListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> MachineTypeListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> MachineTypeListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MachineTypeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -34944,8 +34765,8 @@ impl<'a, C, A> MachineTypeListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -35144,47 +34965,43 @@ impl<'a, C, A> TargetVpnGatewayAggregatedListCall<'a, C, A> where C: BorrowMut TargetVpnGatewayAggregatedListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TargetVpnGatewayAggregatedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TargetVpnGatewayAggregatedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> TargetVpnGatewayAggregatedListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetVpnGatewayAggregatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -35214,8 +35031,8 @@ impl<'a, C, A> TargetVpnGatewayAggregatedListCall<'a, C, A> where C: BorrowMut TargetVpnGatewayGetCall<'a, C, A> where C: BorrowMut TargetVpnGatewayGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> TargetVpnGatewayGetCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the TargetVpnGateway resource to return. + /// /// Sets the *target vpn gateway* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetVpnGateway resource to return. pub fn target_vpn_gateway(mut self, new_value: &str) -> TargetVpnGatewayGetCall<'a, C, A> { self._target_vpn_gateway = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetVpnGatewayGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -35469,8 +35285,8 @@ impl<'a, C, A> TargetVpnGatewayGetCall<'a, C, A> where C: BorrowMut TargetVpnGatewayListCall<'a, C, A> where C: BorrowMut TargetVpnGatewayListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> TargetVpnGatewayListCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TargetVpnGatewayListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TargetVpnGatewayListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> TargetVpnGatewayListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetVpnGatewayListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -35751,8 +35563,8 @@ impl<'a, C, A> TargetVpnGatewayListCall<'a, C, A> where C: BorrowMut TargetVpnGatewayInsertCall<'a, C, A> where C: BorrowMut TargetVpnGatewayInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> TargetVpnGatewayInsertCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> TargetVpnGatewayInsertCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetVpnGatewayInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -36018,8 +35829,8 @@ impl<'a, C, A> TargetVpnGatewayInsertCall<'a, C, A> where C: BorrowMut TargetVpnGatewayDeleteCall<'a, C, A> where C: BorrowMut TargetVpnGatewayDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> TargetVpnGatewayDeleteCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the TargetVpnGateway resource to delete. + /// /// Sets the *target vpn gateway* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetVpnGateway resource to delete. pub fn target_vpn_gateway(mut self, new_value: &str) -> TargetVpnGatewayDeleteCall<'a, C, A> { self._target_vpn_gateway = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetVpnGatewayDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -36273,8 +36083,8 @@ impl<'a, C, A> TargetVpnGatewayDeleteCall<'a, C, A> where C: BorrowMut ProjectMoveDiskCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &DiskMoveRequest) -> ProjectMoveDiskCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ProjectMoveDiskCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectMoveDiskCall<'a, C, A> { self._delegate = Some(new_value); self @@ -36528,8 +36337,8 @@ impl<'a, C, A> ProjectMoveDiskCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -36728,32 +36537,31 @@ impl<'a, C, A> ProjectSetCommonInstanceMetadataCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &Metadata) -> ProjectSetCommonInstanceMetadataCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ProjectSetCommonInstanceMetadataCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectSetCommonInstanceMetadataCall<'a, C, A> { self._delegate = Some(new_value); self @@ -36783,8 +36591,8 @@ impl<'a, C, A> ProjectSetCommonInstanceMetadataCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -36968,23 +36776,22 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ProjectGetCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -37014,8 +36821,8 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -37214,32 +37021,31 @@ impl<'a, C, A> ProjectMoveInstanceCall<'a, C, A> where C: BorrowMut ProjectMoveInstanceCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ProjectMoveInstanceCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectMoveInstanceCall<'a, C, A> { self._delegate = Some(new_value); self @@ -37269,8 +37075,8 @@ impl<'a, C, A> ProjectMoveInstanceCall<'a, C, A> where C: BorrowMut ProjectSetUsageExportBucketCall<'a, C, A> where C: BorrowMut ProjectSetUsageExportBucketCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ProjectSetUsageExportBucketCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectSetUsageExportBucketCall<'a, C, A> { self._delegate = Some(new_value); self @@ -37524,8 +37329,8 @@ impl<'a, C, A> ProjectSetUsageExportBucketCall<'a, C, A> where C: BorrowMut HttpHealthCheckGetCall<'a, C, A> where C: BorrowMut HttpHealthCheckGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the HttpHealthCheck resource to return. + /// /// Sets the *http health check* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the HttpHealthCheck resource to return. pub fn http_health_check(mut self, new_value: &str) -> HttpHealthCheckGetCall<'a, C, A> { self._http_health_check = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> HttpHealthCheckGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -37767,8 +37571,8 @@ impl<'a, C, A> HttpHealthCheckGetCall<'a, C, A> where C: BorrowMut HttpHealthCheckPatchCall<'a, C, A> where C: BorrowMut HttpHealthCheckPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> HttpHealthCheckPatchCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the HttpHealthCheck resource to update. + /// /// Sets the *http health check* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the HttpHealthCheck resource to update. pub fn http_health_check(mut self, new_value: &str) -> HttpHealthCheckPatchCall<'a, C, A> { self._http_health_check = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> HttpHealthCheckPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -38034,8 +37837,8 @@ impl<'a, C, A> HttpHealthCheckPatchCall<'a, C, A> where C: BorrowMut HttpHealthCheckListCall<'a, C, A> where C: BorrowMut HttpHealthCheckListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> HttpHealthCheckListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> HttpHealthCheckListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> HttpHealthCheckListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> HttpHealthCheckListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -38304,8 +38103,8 @@ impl<'a, C, A> HttpHealthCheckListCall<'a, C, A> where C: BorrowMut HttpHealthCheckDeleteCall<'a, C, A> where C: BorrowMut HttpHealthCheckDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the HttpHealthCheck resource to delete. + /// /// Sets the *http health check* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the HttpHealthCheck resource to delete. pub fn http_health_check(mut self, new_value: &str) -> HttpHealthCheckDeleteCall<'a, C, A> { self._http_health_check = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> HttpHealthCheckDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -38547,8 +38345,8 @@ impl<'a, C, A> HttpHealthCheckDeleteCall<'a, C, A> where C: BorrowMut HttpHealthCheckInsertCall<'a, C, A> where C: BorrowMut HttpHealthCheckInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> HttpHealthCheckInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> HttpHealthCheckInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -38802,8 +38599,8 @@ impl<'a, C, A> HttpHealthCheckInsertCall<'a, C, A> where C: BorrowMut HttpHealthCheckUpdateCall<'a, C, A> where C: BorrowMut HttpHealthCheckUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> HttpHealthCheckUpdateCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the HttpHealthCheck resource to update. + /// /// Sets the *http health check* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the HttpHealthCheck resource to update. pub fn http_health_check(mut self, new_value: &str) -> HttpHealthCheckUpdateCall<'a, C, A> { self._http_health_check = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> HttpHealthCheckUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -39069,8 +38865,8 @@ impl<'a, C, A> HttpHealthCheckUpdateCall<'a, C, A> where C: BorrowMut InstanceTemplateDeleteCall<'a, C, A> where C: BorrowMut InstanceTemplateDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the instance template resource to delete. + /// /// Sets the *instance template* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the instance template resource to delete. pub fn instance_template(mut self, new_value: &str) -> InstanceTemplateDeleteCall<'a, C, A> { self._instance_template = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceTemplateDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -39312,8 +39107,8 @@ impl<'a, C, A> InstanceTemplateDeleteCall<'a, C, A> where C: BorrowMut InstanceTemplateGetCall<'a, C, A> where C: BorrowMut InstanceTemplateGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the instance template resource to return. + /// /// Sets the *instance template* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the instance template resource to return. pub fn instance_template(mut self, new_value: &str) -> InstanceTemplateGetCall<'a, C, A> { self._instance_template = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceTemplateGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -39555,8 +39349,8 @@ impl<'a, C, A> InstanceTemplateGetCall<'a, C, A> where C: BorrowMut InstanceTemplateListCall<'a, C, A> where C: BorrowMut InstanceTemplateListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> InstanceTemplateListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> InstanceTemplateListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> InstanceTemplateListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceTemplateListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -39825,8 +39615,8 @@ impl<'a, C, A> InstanceTemplateListCall<'a, C, A> where C: BorrowMut InstanceTemplateInsertCall<'a, C, A> where C: BorrowMut InstanceTemplateInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> InstanceTemplateInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InstanceTemplateInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -40080,8 +39869,8 @@ impl<'a, C, A> InstanceTemplateInsertCall<'a, C, A> where C: BorrowMut TargetHttpProxyDeleteCall<'a, C, A> where C: BorrowMut TargetHttpProxyDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the TargetHttpProxy resource to delete. + /// /// Sets the *target http proxy* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetHttpProxy resource to delete. pub fn target_http_proxy(mut self, new_value: &str) -> TargetHttpProxyDeleteCall<'a, C, A> { self._target_http_proxy = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetHttpProxyDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -40323,8 +40111,8 @@ impl<'a, C, A> TargetHttpProxyDeleteCall<'a, C, A> where C: BorrowMut TargetHttpProxyListCall<'a, C, A> where C: BorrowMut TargetHttpProxyListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TargetHttpProxyListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TargetHttpProxyListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> TargetHttpProxyListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetHttpProxyListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -40593,8 +40377,8 @@ impl<'a, C, A> TargetHttpProxyListCall<'a, C, A> where C: BorrowMut TargetHttpProxyGetCall<'a, C, A> where C: BorrowMut TargetHttpProxyGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the TargetHttpProxy resource to return. + /// /// Sets the *target http proxy* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetHttpProxy resource to return. pub fn target_http_proxy(mut self, new_value: &str) -> TargetHttpProxyGetCall<'a, C, A> { self._target_http_proxy = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetHttpProxyGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -40836,8 +40619,8 @@ impl<'a, C, A> TargetHttpProxyGetCall<'a, C, A> where C: BorrowMut TargetHttpProxySetUrlMapCall<'a, C, A> where C: BorrowMut TargetHttpProxySetUrlMapCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetHttpProxySetUrlMapCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the TargetHttpProxy resource whose URL map is to be set. + /// /// Sets the *target http proxy* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the TargetHttpProxy resource whose URL map is to be set. pub fn target_http_proxy(mut self, new_value: &str) -> TargetHttpProxySetUrlMapCall<'a, C, A> { self._target_http_proxy = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetHttpProxySetUrlMapCall<'a, C, A> { self._delegate = Some(new_value); self @@ -41103,8 +40885,8 @@ impl<'a, C, A> TargetHttpProxySetUrlMapCall<'a, C, A> where C: BorrowMut TargetHttpProxyInsertCall<'a, C, A> where C: BorrowMut TargetHttpProxyInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetHttpProxyInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TargetHttpProxyInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -41358,8 +41139,8 @@ impl<'a, C, A> TargetHttpProxyInsertCall<'a, C, A> where C: BorrowMut ZoneOperationDeleteCall<'a, C, A> where C: BorrowMut ZoneOperationDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the zone scoping this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> ZoneOperationDeleteCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the operation resource to delete. + /// /// Sets the *operation* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the operation resource to delete. pub fn operation(mut self, new_value: &str) -> ZoneOperationDeleteCall<'a, C, A> { self._operation = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ZoneOperationDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -41602,8 +41382,8 @@ impl<'a, C, A> ZoneOperationDeleteCall<'a, C, A> where C: BorrowMut ZoneOperationListCall<'a, C, A> where C: BorrowMut } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the zone scoping this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ZoneOperationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ZoneOperationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -41884,8 +41660,8 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -42073,43 +41849,42 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ZoneOperationGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the zone scoping this request. + /// /// Sets the *zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> ZoneOperationGetCall<'a, C, A> { self._zone = new_value.to_string(); self } + /// Name of the operation resource to return. + /// /// Sets the *operation* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the operation resource to return. pub fn operation(mut self, new_value: &str) -> ZoneOperationGetCall<'a, C, A> { self._operation = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ZoneOperationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -42139,8 +41914,8 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -42326,33 +42101,32 @@ impl<'a, C, A> RouteGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> RouteGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the route resource to return. + /// /// Sets the *route* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the route resource to return. pub fn route(mut self, new_value: &str) -> RouteGetCall<'a, C, A> { self._route = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RouteGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -42382,8 +42156,8 @@ impl<'a, C, A> RouteGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -42582,32 +42356,31 @@ impl<'a, C, A> RouteInsertCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Route) -> RouteInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> RouteInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RouteInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -42637,8 +42410,8 @@ impl<'a, C, A> RouteInsertCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -42837,47 +42610,43 @@ impl<'a, C, A> RouteListCall<'a, C, A> where C: BorrowMut, A: oau } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> RouteListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> RouteListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> RouteListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> RouteListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RouteListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -42907,8 +42676,8 @@ impl<'a, C, A> RouteListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -43094,33 +42863,32 @@ impl<'a, C, A> RouteDeleteCall<'a, C, A> where C: BorrowMut, A: o } + /// Name of the project scoping this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> RouteDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the route resource to delete. + /// /// Sets the *route* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the route resource to delete. pub fn route(mut self, new_value: &str) -> RouteDeleteCall<'a, C, A> { self._route = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RouteDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -43150,8 +42918,8 @@ impl<'a, C, A> RouteDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -43352,42 +43120,41 @@ impl<'a, C, A> FirewallPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Firewall) -> FirewallPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallPatchCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the firewall resource to update. + /// /// Sets the *firewall* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the firewall resource to update. pub fn firewall(mut self, new_value: &str) -> FirewallPatchCall<'a, C, A> { self._firewall = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FirewallPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -43417,8 +43184,8 @@ impl<'a, C, A> FirewallPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -43604,33 +43371,32 @@ impl<'a, C, A> FirewallGetCall<'a, C, A> where C: BorrowMut, A: o } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the firewall resource to return. + /// /// Sets the *firewall* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the firewall resource to return. pub fn firewall(mut self, new_value: &str) -> FirewallGetCall<'a, C, A> { self._firewall = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FirewallGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -43660,8 +43426,8 @@ impl<'a, C, A> FirewallGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -43860,32 +43626,31 @@ impl<'a, C, A> FirewallInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Firewall) -> FirewallInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FirewallInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -43915,8 +43680,8 @@ impl<'a, C, A> FirewallInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -44117,42 +43882,41 @@ impl<'a, C, A> FirewallUpdateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Firewall) -> FirewallUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallUpdateCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the firewall resource to update. + /// /// Sets the *firewall* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the firewall resource to update. pub fn firewall(mut self, new_value: &str) -> FirewallUpdateCall<'a, C, A> { self._firewall = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FirewallUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -44182,8 +43946,8 @@ impl<'a, C, A> FirewallUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -44369,33 +44133,32 @@ impl<'a, C, A> FirewallDeleteCall<'a, C, A> where C: BorrowMut, A } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the firewall resource to delete. + /// /// Sets the *firewall* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the firewall resource to delete. pub fn firewall(mut self, new_value: &str) -> FirewallDeleteCall<'a, C, A> { self._firewall = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FirewallDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -44425,8 +44188,8 @@ impl<'a, C, A> FirewallDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -44625,47 +44388,43 @@ impl<'a, C, A> FirewallListCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> FirewallListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> FirewallListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> FirewallListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FirewallListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -44695,8 +44454,8 @@ impl<'a, C, A> FirewallListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -44884,43 +44643,42 @@ impl<'a, C, A> VpnTunnelDeleteCall<'a, C, A> where C: BorrowMut, } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> VpnTunnelDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> VpnTunnelDeleteCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the VpnTunnel resource to delete. + /// /// Sets the *vpn tunnel* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the VpnTunnel resource to delete. pub fn vpn_tunnel(mut self, new_value: &str) -> VpnTunnelDeleteCall<'a, C, A> { self._vpn_tunnel = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VpnTunnelDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -44950,8 +44708,8 @@ impl<'a, C, A> VpnTunnelDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -45152,57 +44910,53 @@ impl<'a, C, A> VpnTunnelListCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> VpnTunnelListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> VpnTunnelListCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> VpnTunnelListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> VpnTunnelListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> VpnTunnelListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VpnTunnelListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -45232,8 +44986,8 @@ impl<'a, C, A> VpnTunnelListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -45421,43 +45175,42 @@ impl<'a, C, A> VpnTunnelGetCall<'a, C, A> where C: BorrowMut, A: } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> VpnTunnelGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> VpnTunnelGetCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the VpnTunnel resource to return. + /// /// Sets the *vpn tunnel* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the VpnTunnel resource to return. pub fn vpn_tunnel(mut self, new_value: &str) -> VpnTunnelGetCall<'a, C, A> { self._vpn_tunnel = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VpnTunnelGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -45487,8 +45240,8 @@ impl<'a, C, A> VpnTunnelGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -45689,42 +45442,41 @@ impl<'a, C, A> VpnTunnelInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &VpnTunnel) -> VpnTunnelInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Project ID for this request. pub fn project(mut self, new_value: &str) -> VpnTunnelInsertCall<'a, C, A> { self._project = new_value.to_string(); self } + /// The name of the region for this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> VpnTunnelInsertCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VpnTunnelInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -45754,8 +45506,8 @@ impl<'a, C, A> VpnTunnelInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -45954,47 +45706,43 @@ impl<'a, C, A> VpnTunnelAggregatedListCall<'a, C, A> where C: BorrowMut VpnTunnelAggregatedListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> VpnTunnelAggregatedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> VpnTunnelAggregatedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> VpnTunnelAggregatedListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VpnTunnelAggregatedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -46024,8 +45772,8 @@ impl<'a, C, A> VpnTunnelAggregatedListCall<'a, C, A> where C: BorrowMut RegionOperationListCall<'a, C, A> where C: BorrowMut RegionOperationListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> RegionOperationListCall<'a, C, A> { self._region = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> RegionOperationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> RegionOperationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Optional. Filter expression for filtering listed resources. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> RegionOperationListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RegionOperationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -46306,8 +46050,8 @@ impl<'a, C, A> RegionOperationListCall<'a, C, A> where C: BorrowMut RegionOperationDeleteCall<'a, C, A> where C: BorrowMut RegionOperationDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the region scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> RegionOperationDeleteCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the operation resource to delete. + /// /// Sets the *operation* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the operation resource to delete. pub fn operation(mut self, new_value: &str) -> RegionOperationDeleteCall<'a, C, A> { self._operation = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RegionOperationDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -46550,8 +46293,8 @@ impl<'a, C, A> RegionOperationDeleteCall<'a, C, A> where C: BorrowMut RegionOperationGetCall<'a, C, A> where C: BorrowMut RegionOperationGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Name of the zone scoping this request. + /// /// Sets the *region* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the zone scoping this request. pub fn region(mut self, new_value: &str) -> RegionOperationGetCall<'a, C, A> { self._region = new_value.to_string(); self } + /// Name of the operation resource to return. + /// /// Sets the *operation* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name of the operation resource to return. pub fn operation(mut self, new_value: &str) -> RegionOperationGetCall<'a, C, A> { self._operation = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RegionOperationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -46805,8 +46547,8 @@ impl<'a, C, A> RegionOperationGetCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/container1_beta1/src/cmn.rs b/gen/container1_beta1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/container1_beta1/src/cmn.rs +++ b/gen/container1_beta1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/container1_beta1/src/lib.rs b/gen/container1_beta1/src/lib.rs index 49fb57e126..8a0c37ee0f 100644 --- a/gen/container1_beta1/src/lib.rs +++ b/gen/container1_beta1/src/lib.rs @@ -100,16 +100,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -267,16 +269,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -327,7 +331,7 @@ impl<'a, C, A> Container /// /// * [zones operations list projects](struct.ProjectZoneOperationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListOperationsResponse { /// A list of operations in the project in the specified zone. pub operations: Vec, @@ -345,7 +349,7 @@ impl ResponseResult for ListOperationsResponse {} /// /// * [clusters list projects](struct.ProjectClusterListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListAggregatedClustersResponse { /// A list of clusters in the project, across all zones. pub clusters: Vec, @@ -363,7 +367,7 @@ impl ResponseResult for ListAggregatedClustersResponse {} /// /// * [zones clusters list projects](struct.ProjectZoneClusterListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListClustersResponse { /// A list of clusters in the project in the specified zone. pub clusters: Vec, @@ -505,7 +509,7 @@ impl Part for ServiceAccount {} /// * [zones clusters delete projects](struct.ProjectZoneClusterDeleteCall.html) (response) /// * [zones clusters create projects](struct.ProjectZoneClusterCreateCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { /// The current status of the operation. pub status: String, @@ -541,7 +545,7 @@ impl ResponseResult for Operation {} /// /// * [operations list projects](struct.ProjectOperationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListAggregatedOperationsResponse { /// A list of operations in the project, across all zones. pub operations: Vec, @@ -956,43 +960,42 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterGetCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The name of the Google Compute Engine zone in which the cluster resides. + /// /// Sets the *zone id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the Google Compute Engine zone in which the cluster resides. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneClusterGetCall<'a, C, A> { self._zone_id = new_value.to_string(); self } + /// The name of the cluster to retrieve. + /// /// Sets the *cluster id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the cluster to retrieve. pub fn cluster_id(mut self, new_value: &str) -> ProjectZoneClusterGetCall<'a, C, A> { self._cluster_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectZoneClusterGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1022,8 +1025,8 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut ProjectOperationListCall<'a, C, A> where C: BorrowMut ProjectOperationListCall<'a, C, A> { self._project_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectOperationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1253,8 +1255,8 @@ impl<'a, C, A> ProjectOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectZoneClusterDeleteCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The name of the Google Compute Engine zone in which the cluster resides. + /// /// Sets the *zone id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the Google Compute Engine zone in which the cluster resides. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> { self._zone_id = new_value.to_string(); self } + /// The name of the cluster to delete. + /// /// Sets the *cluster id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the cluster to delete. pub fn cluster_id(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> { self._cluster_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectZoneClusterDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1510,8 +1511,8 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectClusterListCall<'a, C, A> where C: BorrowMut ProjectClusterListCall<'a, C, A> { self._project_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectClusterListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1741,8 +1741,8 @@ impl<'a, C, A> ProjectClusterListCall<'a, C, A> where C: BorrowMut ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut ProjectZoneOperationGetCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The name of the Google Compute Engine zone in which the operation resides. This is always the same zone as the cluster with which the operation is associated. + /// /// Sets the *zone id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the Google Compute Engine zone in which the operation resides. This is always the same zone as the cluster with which the operation is associated. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneOperationGetCall<'a, C, A> { self._zone_id = new_value.to_string(); self } + /// The server-assigned name of the operation. + /// /// Sets the *operation id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The server-assigned name of the operation. pub fn operation_id(mut self, new_value: &str) -> ProjectZoneOperationGetCall<'a, C, A> { self._operation_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectZoneOperationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1996,8 +1995,8 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneOperationListCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The name of the Google Compute Engine zone to return operations for. + /// /// Sets the *zone id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the Google Compute Engine zone to return operations for. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneOperationListCall<'a, C, A> { self._zone_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectZoneOperationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2239,8 +2237,8 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterListCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The name of the Google Compute Engine zone in which the cluster resides. + /// /// Sets the *zone id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the Google Compute Engine zone in which the cluster resides. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneClusterListCall<'a, C, A> { self._zone_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectZoneClusterListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2482,8 +2479,8 @@ impl<'a, C, A> ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterCreateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The Google Developers Console project ID or project number. + /// /// Sets the *project id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The Google Developers Console project ID or project number. pub fn project_id(mut self, new_value: &str) -> ProjectZoneClusterCreateCall<'a, C, A> { self._project_id = new_value.to_string(); self } + /// The name of the Google Compute Engine zone in which the cluster resides. + /// /// Sets the *zone id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the Google Compute Engine zone in which the cluster resides. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneClusterCreateCall<'a, C, A> { self._zone_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectZoneClusterCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2755,8 +2751,8 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/content2/src/cmn.rs b/gen/content2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/content2/src/cmn.rs +++ b/gen/content2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/content2/src/lib.rs b/gen/content2/src/lib.rs index 905af899db..0ca240d6ab 100644 --- a/gen/content2/src/lib.rs +++ b/gen/content2/src/lib.rs @@ -127,16 +127,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -300,16 +302,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -379,7 +383,7 @@ impl<'a, C, A> ShoppingContent /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Errors { /// The message of the first error in errors. pub message: String, @@ -415,7 +419,7 @@ impl Part for ProductAspect {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductsCustomBatchResponseEntry { /// The ID of the request entry this entry responds to. #[serde(rename="batchId")] @@ -440,7 +444,7 @@ impl Part for ProductsCustomBatchResponseEntry {} /// /// * [custombatch accounttax](struct.AccounttaxCustombatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccounttaxCustomBatchResponse { /// Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponse". pub kind: String, @@ -460,7 +464,7 @@ impl ResponseResult for AccounttaxCustomBatchResponse {} /// /// * [custombatch accountshipping](struct.AccountshippingCustombatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountshippingCustomBatchResponse { /// Identifies what kind of resource this is. Value: the fixed string "content#accountshippingCustomBatchResponse". pub kind: String, @@ -480,7 +484,7 @@ impl ResponseResult for AccountshippingCustomBatchResponse {} /// /// * [custombatch inventory](struct.InventoryCustombatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InventoryCustomBatchResponse { /// Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponse". pub kind: String, @@ -549,7 +553,7 @@ impl RequestValue for ProductstatusesCustomBatchRequest {} /// /// * [custombatch datafeeds](struct.DatafeedCustombatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatafeedsCustomBatchResponse { /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedsCustomBatchResponse". pub kind: String, @@ -595,7 +599,7 @@ impl Part for AccountShippingLocationGroup {} /// /// * [set inventory](struct.InventorySetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InventorySetResponse { /// Identifies what kind of resource this is. Value: the fixed string "content#inventorySetResponse". pub kind: String, @@ -613,7 +617,7 @@ impl ResponseResult for InventorySetResponse {} /// /// * [get productstatuses](struct.ProductstatuseGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductStatus { /// Date on which the item expires in Google Shopping, in ISO 8601 format. #[serde(rename="googleExpirationDate")] @@ -681,7 +685,7 @@ impl Part for DatafeedFetchSchedule {} /// /// * [get datafeedstatuses](struct.DatafeedstatuseGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatafeedStatus { /// The number of items in the feed that were valid. #[serde(rename="itemsValid")] @@ -732,7 +736,7 @@ impl Part for DatafeedstatusesCustomBatchRequestEntry {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccounttaxCustomBatchResponseEntry { /// The ID of the request entry this entry responds to. #[serde(rename="batchId")] @@ -841,7 +845,7 @@ impl ResponseResult for Account {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountIdentifier { /// The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount). #[serde(rename="aggregatorId")] @@ -858,7 +862,7 @@ impl Part for AccountIdentifier {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InventoryCustomBatchResponseEntry { /// The ID of the request entry this entry responds to. #[serde(rename="batchId")] @@ -910,7 +914,7 @@ impl Part for ProductShippingDimension {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountstatusesCustomBatchResponseEntry { /// The ID of the request entry this entry responds to. #[serde(rename="batchId")] @@ -956,7 +960,7 @@ impl Part for AccountstatusesCustomBatchRequestEntry {} /// /// * [list accounttax](struct.AccounttaxListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccounttaxListResponse { /// The token for the retrieval of the next page of account tax settings. #[serde(rename="nextPageToken")] @@ -1009,7 +1013,7 @@ impl Part for ErrorType {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatafeedsCustomBatchResponseEntry { /// The ID of the request entry this entry responds to. #[serde(rename="batchId")] @@ -1057,7 +1061,7 @@ impl Part for AccountshippingCustomBatchRequestEntry {} /// /// * [list datafeeds](struct.DatafeedListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatafeedsListResponse { /// The token for the retrieval of the next page of datafeeds. #[serde(rename="nextPageToken")] @@ -1153,7 +1157,7 @@ impl Part for ProductsCustomBatchRequestEntry {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountsCustomBatchResponseEntry { /// The ID of the request entry this entry responds to. #[serde(rename="batchId")] @@ -1196,7 +1200,7 @@ impl RequestValue for AccountsCustomBatchRequest {} /// /// * [custombatch productstatuses](struct.ProductstatuseCustombatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductstatusesCustomBatchResponse { /// Identifies what kind of resource this is. Value: the fixed string "content#productstatusesCustomBatchResponse". pub kind: String, @@ -1350,7 +1354,7 @@ impl Part for ProductTax {} /// /// * [custombatch datafeedstatuses](struct.DatafeedstatuseCustombatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatafeedstatusesCustomBatchResponse { /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedstatusesCustomBatchResponse". pub kind: String, @@ -1394,7 +1398,7 @@ impl Part for AccountsCustomBatchRequestEntry {} /// /// * [authinfo accounts](struct.AccountAuthinfoCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountsAuthInfoResponse { /// Identifies what kind of resource this is. Value: the fixed string "content#accountsAuthInfoResponse". pub kind: String, @@ -1436,7 +1440,7 @@ impl RequestValue for ProductsCustomBatchRequest {} /// /// * [list datafeedstatuses](struct.DatafeedstatuseListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatafeedstatusesListResponse { /// The token for the retrieval of the next page of datafeed statuses. #[serde(rename="nextPageToken")] @@ -1474,7 +1478,7 @@ impl Part for ProductUnitPricingMeasure {} /// /// * [custombatch accountstatuses](struct.AccountstatuseCustombatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountstatusesCustomBatchResponse { /// Identifies what kind of resource this is. Value: the fixed string "content#accountstatusesCustomBatchResponse". pub kind: String, @@ -1494,7 +1498,7 @@ impl ResponseResult for AccountstatusesCustomBatchResponse {} /// /// * [get accountstatuses](struct.AccountstatuseGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountStatus { /// Identifies what kind of resource this is. Value: the fixed string "content#accountStatus". pub kind: String, @@ -1528,7 +1532,7 @@ impl Part for ProductInstallment {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatafeedstatusesCustomBatchResponseEntry { /// The ID of the request entry this entry responds to. #[serde(rename="batchId")] @@ -1590,7 +1594,7 @@ impl Part for AccountShippingRateTable {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductStatusDestinationStatus { /// The destination's approval status. #[serde(rename="approvalStatus")] @@ -1656,7 +1660,7 @@ impl Part for InventoryCustomBatchRequestEntry {} /// /// * [custombatch products](struct.ProductCustombatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductsCustomBatchResponse { /// Identifies what kind of resource this is. Value: the fixed string "content#productsCustomBatchResponse". pub kind: String, @@ -1676,7 +1680,7 @@ impl ResponseResult for ProductsCustomBatchResponse {} /// /// * [list accountshipping](struct.AccountshippingListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountshippingListResponse { /// The token for the retrieval of the next page of account shipping settings. #[serde(rename="nextPageToken")] @@ -1694,7 +1698,7 @@ impl ResponseResult for AccountshippingListResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountStatusExampleItem { /// Unique item ID as specified in the uploaded product data. #[serde(rename="itemId")] @@ -1755,7 +1759,7 @@ impl Part for Price {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatafeedStatusError { /// The number of occurrences of the error in the feed. pub count: String, @@ -1774,7 +1778,7 @@ impl Part for DatafeedStatusError {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatafeedStatusExample { /// The ID of the example item. #[serde(rename="itemId")] @@ -1933,7 +1937,7 @@ impl Part for ProductCustomAttribute {} /// /// * [list accountstatuses](struct.AccountstatuseListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountstatusesListResponse { /// The token for the retrieval of the next page of account statuses. #[serde(rename="nextPageToken")] @@ -2205,7 +2209,7 @@ impl ResponseResult for Product {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductStatusDataQualityIssue { /// The value the attribute had at time of evaluation. #[serde(rename="valueProvided")] @@ -2240,7 +2244,7 @@ impl Part for ProductStatusDataQualityIssue {} /// /// * [list products](struct.ProductListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductsListResponse { /// The token for the retrieval of the next page of products. #[serde(rename="nextPageToken")] @@ -2282,7 +2286,7 @@ impl Part for AccountShippingShippingService {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountshippingCustomBatchResponseEntry { /// The ID of the request entry this entry responds to. #[serde(rename="batchId")] @@ -2352,7 +2356,7 @@ impl Part for ProductDestination {} /// /// * [custombatch accounts](struct.AccountCustombatchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountsCustomBatchResponse { /// Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponse". pub kind: String, @@ -2396,7 +2400,7 @@ impl Part for DatafeedsCustomBatchRequestEntry {} /// /// * [list productstatuses](struct.ProductstatuseListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductstatusesListResponse { /// The token for the retrieval of the next page of products statuses. #[serde(rename="nextPageToken")] @@ -2429,7 +2433,7 @@ impl Part for Weight {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountStatusDataQualityIssue { /// Actual value displayed on the landing page. #[serde(rename="displayedValue")] @@ -2466,7 +2470,7 @@ impl Part for AccountStatusDataQualityIssue {} /// /// * [list accounts](struct.AccountListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountsListResponse { /// The token for the retrieval of the next page of accounts. #[serde(rename="nextPageToken")] @@ -2484,7 +2488,7 @@ impl ResponseResult for AccountsListResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductstatusesCustomBatchResponseEntry { /// The ID of the request entry this entry responds to. #[serde(rename="batchId")] @@ -3913,22 +3917,21 @@ impl<'a, C, A> AccounttaxCustombatchCall<'a, C, A> where C: BorrowMut AccounttaxCustombatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccounttaxCustombatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3958,8 +3961,8 @@ impl<'a, C, A> AccounttaxCustombatchCall<'a, C, A> where C: BorrowMut AccounttaxPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &AccountTax) -> AccounttaxPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccounttaxPatchCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the account for which to get/update account tax settings. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the account for which to get/update account tax settings. pub fn account_id(mut self, new_value: &str) -> AccounttaxPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccounttaxPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4225,8 +4227,8 @@ impl<'a, C, A> AccounttaxPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4420,39 +4422,36 @@ impl<'a, C, A> AccounttaxListCall<'a, C, A> where C: BorrowMut, A } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccounttaxListCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccounttaxListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of tax settings to return in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AccounttaxListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccounttaxListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4482,8 +4481,8 @@ impl<'a, C, A> AccounttaxListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4684,42 +4683,41 @@ impl<'a, C, A> AccounttaxUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &AccountTax) -> AccounttaxUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccounttaxUpdateCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the account for which to get/update account tax settings. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the account for which to get/update account tax settings. pub fn account_id(mut self, new_value: &str) -> AccounttaxUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccounttaxUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4749,8 +4747,8 @@ impl<'a, C, A> AccounttaxUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4936,33 +4934,32 @@ impl<'a, C, A> AccounttaxGetCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccounttaxGetCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the account for which to get/update account tax settings. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the account for which to get/update account tax settings. pub fn account_id(mut self, new_value: &str) -> AccounttaxGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccounttaxGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4992,8 +4989,8 @@ impl<'a, C, A> AccounttaxGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5179,31 +5176,30 @@ impl<'a, C, A> DatafeedstatuseGetCall<'a, C, A> where C: BorrowMut DatafeedstatuseGetCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// /// Sets the *datafeed id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn datafeed_id(mut self, new_value: &str) -> DatafeedstatuseGetCall<'a, C, A> { self._datafeed_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatafeedstatuseGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5233,8 +5229,8 @@ impl<'a, C, A> DatafeedstatuseGetCall<'a, C, A> where C: BorrowMut DatafeedstatuseListCall<'a, C, A> where C: BorrowMut DatafeedstatuseListCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DatafeedstatuseListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of products to return in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> DatafeedstatuseListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatafeedstatuseListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5490,8 +5483,8 @@ impl<'a, C, A> DatafeedstatuseListCall<'a, C, A> where C: BorrowMut DatafeedstatuseCustombatchCall<'a, C, A> where C: BorrowMut DatafeedstatuseCustombatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatafeedstatuseCustombatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5707,8 +5699,8 @@ impl<'a, C, A> DatafeedstatuseCustombatchCall<'a, C, A> where C: BorrowMut DatafeedCustombatchCall<'a, C, A> where C: BorrowMut DatafeedCustombatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatafeedCustombatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5924,8 +5915,8 @@ impl<'a, C, A> DatafeedCustombatchCall<'a, C, A> where C: BorrowMut DatafeedGetCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn merchant_id(mut self, new_value: &str) -> DatafeedGetCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// /// Sets the *datafeed id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn datafeed_id(mut self, new_value: &str) -> DatafeedGetCall<'a, C, A> { self._datafeed_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatafeedGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6165,8 +6155,8 @@ impl<'a, C, A> DatafeedGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6367,40 +6357,39 @@ impl<'a, C, A> DatafeedPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Datafeed) -> DatafeedPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn merchant_id(mut self, new_value: &str) -> DatafeedPatchCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// /// Sets the *datafeed id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn datafeed_id(mut self, new_value: &str) -> DatafeedPatchCall<'a, C, A> { self._datafeed_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatafeedPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6430,8 +6419,8 @@ impl<'a, C, A> DatafeedPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6606,31 +6595,30 @@ impl<'a, C, A> DatafeedDeleteCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn merchant_id(mut self, new_value: &str) -> DatafeedDeleteCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// /// Sets the *datafeed id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn datafeed_id(mut self, new_value: &str) -> DatafeedDeleteCall<'a, C, A> { self._datafeed_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatafeedDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6660,8 +6648,8 @@ impl<'a, C, A> DatafeedDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6860,31 +6848,30 @@ impl<'a, C, A> DatafeedInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Datafeed) -> DatafeedInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn merchant_id(mut self, new_value: &str) -> DatafeedInsertCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatafeedInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6914,8 +6901,8 @@ impl<'a, C, A> DatafeedInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7109,39 +7096,36 @@ impl<'a, C, A> DatafeedListCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> DatafeedListCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DatafeedListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of products to return in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> DatafeedListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatafeedListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7171,8 +7155,8 @@ impl<'a, C, A> DatafeedListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7373,40 +7357,39 @@ impl<'a, C, A> DatafeedUpdateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Datafeed) -> DatafeedUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn merchant_id(mut self, new_value: &str) -> DatafeedUpdateCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// /// Sets the *datafeed id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// pub fn datafeed_id(mut self, new_value: &str) -> DatafeedUpdateCall<'a, C, A> { self._datafeed_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatafeedUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7436,8 +7419,8 @@ impl<'a, C, A> DatafeedUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7623,33 +7606,32 @@ impl<'a, C, A> ProductstatuseGetCall<'a, C, A> where C: BorrowMut } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> ProductstatuseGetCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the product. + /// /// Sets the *product id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductstatuseGetCall<'a, C, A> { self._product_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductstatuseGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7679,8 +7661,8 @@ impl<'a, C, A> ProductstatuseGetCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7874,39 +7856,36 @@ impl<'a, C, A> ProductstatuseListCall<'a, C, A> where C: BorrowMut ProductstatuseListCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ProductstatuseListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of product statuses to return in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ProductstatuseListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductstatuseListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7936,8 +7915,8 @@ impl<'a, C, A> ProductstatuseListCall<'a, C, A> where C: BorrowMut ProductstatuseCustombatchCall<'a, C, A> where C: BorrowMut ProductstatuseCustombatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductstatuseCustombatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8155,8 +8133,8 @@ impl<'a, C, A> ProductstatuseCustombatchCall<'a, C, A> where C: BorrowMut AccountAuthinfoCall<'a, C, A> where C: BorrowMut, } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountAuthinfoCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8350,8 +8327,8 @@ impl<'a, C, A> AccountAuthinfoCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8552,42 +8529,41 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Account) -> AccountPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountPatchCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the account. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the account. pub fn account_id(mut self, new_value: &str) -> AccountPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8617,8 +8593,8 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8804,33 +8780,32 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountGetCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the account. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the account. pub fn account_id(mut self, new_value: &str) -> AccountGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8860,8 +8835,8 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9062,42 +9037,41 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Account) -> AccountUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountUpdateCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the account. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the account. pub fn account_id(mut self, new_value: &str) -> AccountUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9127,8 +9101,8 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9322,39 +9296,36 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountListCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of accounts to return in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AccountListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9384,8 +9355,8 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9560,33 +9531,32 @@ impl<'a, C, A> AccountDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountDeleteCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the account. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the account. pub fn account_id(mut self, new_value: &str) -> AccountDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9616,8 +9586,8 @@ impl<'a, C, A> AccountDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9790,22 +9760,21 @@ impl<'a, C, A> AccountCustombatchCall<'a, C, A> where C: BorrowMut AccountCustombatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountCustombatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9835,8 +9804,8 @@ impl<'a, C, A> AccountCustombatchCall<'a, C, A> where C: BorrowMut AccountInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Account) -> AccountInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountInsertCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10090,8 +10058,8 @@ impl<'a, C, A> AccountInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10294,52 +10262,51 @@ impl<'a, C, A> InventorySetCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &InventorySetRequest) -> InventorySetCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> InventorySetCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The code of the store for which to update price and availability. Use online to update price and availability of an online product. + /// /// Sets the *store code* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The code of the store for which to update price and availability. Use online to update price and availability of an online product. pub fn store_code(mut self, new_value: &str) -> InventorySetCall<'a, C, A> { self._store_code = new_value.to_string(); self } + /// The ID of the product for which to update price and availability. + /// /// Sets the *product id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product for which to update price and availability. pub fn product_id(mut self, new_value: &str) -> InventorySetCall<'a, C, A> { self._product_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InventorySetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10369,8 +10336,8 @@ impl<'a, C, A> InventorySetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10543,22 +10510,21 @@ impl<'a, C, A> InventoryCustombatchCall<'a, C, A> where C: BorrowMut InventoryCustombatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> InventoryCustombatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10588,8 +10554,8 @@ impl<'a, C, A> InventoryCustombatchCall<'a, C, A> where C: BorrowMut AccountstatuseGetCall<'a, C, A> where C: BorrowMut } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountstatuseGetCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the account. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the account. pub fn account_id(mut self, new_value: &str) -> AccountstatuseGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountstatuseGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10831,8 +10796,8 @@ impl<'a, C, A> AccountstatuseGetCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11026,39 +10991,36 @@ impl<'a, C, A> AccountstatuseListCall<'a, C, A> where C: BorrowMut AccountstatuseListCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountstatuseListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of account statuses to return in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AccountstatuseListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountstatuseListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11088,8 +11050,8 @@ impl<'a, C, A> AccountstatuseListCall<'a, C, A> where C: BorrowMut AccountstatuseCustombatchCall<'a, C, A> where C: BorrowMut AccountstatuseCustombatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountstatuseCustombatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11305,8 +11266,8 @@ impl<'a, C, A> AccountstatuseCustombatchCall<'a, C, A> where C: BorrowMut ProductListCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> ProductListCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ProductListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of products to return in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ProductListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11562,8 +11520,8 @@ impl<'a, C, A> ProductListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11749,33 +11707,32 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> ProductGetCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the product. + /// /// Sets the *product id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductGetCall<'a, C, A> { self._product_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11805,8 +11762,8 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11986,41 +11943,39 @@ impl<'a, C, A> ProductDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> ProductDeleteCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the product. + /// /// Sets the *product id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductDeleteCall<'a, C, A> { self._product_id = new_value.to_string(); self } - /// Sets the *dry run* query property to the given value. - /// - /// /// Flag to run the request in dry-run mode. + /// + /// Sets the *dry run* query property to the given value. pub fn dry_run(mut self, new_value: bool) -> ProductDeleteCall<'a, C, A> { self._dry_run = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12050,8 +12005,8 @@ impl<'a, C, A> ProductDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12229,30 +12184,28 @@ impl<'a, C, A> ProductCustombatchCall<'a, C, A> where C: BorrowMut ProductCustombatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *dry run* query property to the given value. - /// - /// /// Flag to run the request in dry-run mode. + /// + /// Sets the *dry run* query property to the given value. pub fn dry_run(mut self, new_value: bool) -> ProductCustombatchCall<'a, C, A> { self._dry_run = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductCustombatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12282,8 +12235,8 @@ impl<'a, C, A> ProductCustombatchCall<'a, C, A> where C: BorrowMut ProductInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Product) -> ProductInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> ProductInsertCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// Sets the *dry run* query property to the given value. - /// - /// /// Flag to run the request in dry-run mode. + /// + /// Sets the *dry run* query property to the given value. pub fn dry_run(mut self, new_value: bool) -> ProductInsertCall<'a, C, A> { self._dry_run = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProductInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12550,8 +12501,8 @@ impl<'a, C, A> ProductInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12745,39 +12696,36 @@ impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut AccountshippingListCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountshippingListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of shipping settings to return in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AccountshippingListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountshippingListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12807,8 +12755,8 @@ impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut AccountshippingPatchCall<'a, C, A> where C: BorrowMut AccountshippingPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountshippingPatchCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the account for which to get/update account shipping settings. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the account for which to get/update account shipping settings. pub fn account_id(mut self, new_value: &str) -> AccountshippingPatchCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountshippingPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13074,8 +13021,8 @@ impl<'a, C, A> AccountshippingPatchCall<'a, C, A> where C: BorrowMut AccountshippingUpdateCall<'a, C, A> where C: BorrowMut AccountshippingUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the managing account. + /// /// Sets the *merchant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountshippingUpdateCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the account for which to get/update account shipping settings. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the account for which to get/update account shipping settings. pub fn account_id(mut self, new_value: &str) -> AccountshippingUpdateCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountshippingUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13341,8 +13287,8 @@ impl<'a, C, A> AccountshippingUpdateCall<'a, C, A> where C: BorrowMut AccountshippingCustombatchCall<'a, C, A> where C: BorrowMut AccountshippingCustombatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountshippingCustombatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13560,8 +13505,8 @@ impl<'a, C, A> AccountshippingCustombatchCall<'a, C, A> where C: BorrowMut AccountshippingGetCall<'a, C, A> where C: BorrowMut AccountshippingGetCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } + /// The ID of the account for which to get/update account shipping settings. + /// /// Sets the *account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the account for which to get/update account shipping settings. pub fn account_id(mut self, new_value: &str) -> AccountshippingGetCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountshippingGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13803,8 +13747,8 @@ impl<'a, C, A> AccountshippingGetCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/coordinate1/src/lib.rs b/gen/coordinate1/src/lib.rs index 9b388e1cce..cfb998c11b 100644 --- a/gen/coordinate1/src/lib.rs +++ b/gen/coordinate1/src/lib.rs @@ -128,16 +128,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -315,16 +317,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -390,7 +394,7 @@ impl<'a, C, A> Coordinate /// /// * [list location](struct.LocationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LocationListResponse { /// A token to provide to get the next page of results. #[serde(rename="nextPageToken")] @@ -428,7 +432,7 @@ impl Part for JobChange {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EnumItemDef { /// Whether the enum item is active. Jobs may contain inactive enum values; however, setting an enum to an inactive value when creating or updating a job will result in a 500 error. pub active: bool, @@ -450,7 +454,7 @@ impl Part for EnumItemDef {} /// /// * [list custom field def](struct.CustomFieldDefListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomFieldDefListResponse { /// Collection of custom field definitions in a team. pub items: Vec, @@ -465,7 +469,7 @@ impl ResponseResult for CustomFieldDefListResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TokenPagination { /// A token to provide to get the next page of results. #[serde(rename="nextPageToken")] @@ -504,7 +508,7 @@ impl Part for Location {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Team { /// Identifies this object as a team. pub kind: String, @@ -574,7 +578,7 @@ impl Part for CustomFields {} /// /// * [list worker](struct.WorkerListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct WorkerListResponse { /// Workers in the collection. pub items: Vec, @@ -589,7 +593,7 @@ impl ResponseResult for WorkerListResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LocationRecord { /// Latitude. pub latitude: f64, @@ -649,7 +653,7 @@ impl ResponseResult for Schedule {} /// /// * [list team](struct.TeamListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TeamListResponse { /// Teams in the collection. pub items: Vec, @@ -669,7 +673,7 @@ impl ResponseResult for TeamListResponse {} /// /// * [list jobs](struct.JobListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobListResponse { /// A token to provide to get the next page of results. #[serde(rename="nextPageToken")] @@ -687,7 +691,7 @@ impl ResponseResult for JobListResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Worker { /// Identifies this object as a worker. pub kind: String, @@ -733,7 +737,7 @@ impl ResponseResult for Job {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomFieldDef { /// Identifies this object as a custom field definition. pub kind: String, @@ -1475,33 +1479,32 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } + /// Team ID + /// /// Sets the *team id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Team ID pub fn team_id(mut self, new_value: &str) -> JobGetCall<'a, C, A> { self._team_id = new_value.to_string(); self } + /// Job number + /// /// Sets the *job id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Job number pub fn job_id(mut self, new_value: &str) -> JobGetCall<'a, C, A> { self._job_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1531,8 +1534,8 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1787,123 +1790,112 @@ impl<'a, C, A> JobUpdateCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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) -> JobUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Team ID + /// /// Sets the *team id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Team ID pub fn team_id(mut self, new_value: &str) -> JobUpdateCall<'a, C, A> { self._team_id = new_value.to_string(); self } + /// Job number + /// /// Sets the *job id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Job number pub fn job_id(mut self, new_value: &str) -> JobUpdateCall<'a, C, A> { self._job_id = new_value.to_string(); self } - /// Sets the *title* query property to the given value. - /// - /// /// Job title + /// + /// Sets the *title* query property to the given value. pub fn title(mut self, new_value: &str) -> JobUpdateCall<'a, C, A> { self._title = Some(new_value.to_string()); self } - /// Sets the *progress* query property to the given value. - /// - /// /// Job progress + /// + /// Sets the *progress* query property to the given value. pub fn progress(mut self, new_value: &str) -> JobUpdateCall<'a, C, A> { self._progress = Some(new_value.to_string()); self } - /// Sets the *note* query property to the given value. - /// - /// /// Job note as newline (Unix) separated string + /// + /// Sets the *note* query property to the given value. pub fn note(mut self, new_value: &str) -> JobUpdateCall<'a, C, A> { self._note = Some(new_value.to_string()); self } - /// Sets the *lng* query property to the given value. - /// - /// /// The longitude coordinate of this job's location. + /// + /// Sets the *lng* query property to the given value. pub fn lng(mut self, new_value: f64) -> JobUpdateCall<'a, C, A> { self._lng = Some(new_value); self } - /// Sets the *lat* query property to the given value. - /// - /// /// The latitude coordinate of this job's location. + /// + /// Sets the *lat* query property to the given value. pub fn lat(mut self, new_value: f64) -> JobUpdateCall<'a, C, A> { self._lat = Some(new_value); self } - /// Sets the *customer phone number* query property to the given value. - /// - /// /// Customer phone number + /// + /// Sets the *customer phone number* query property to the given value. pub fn customer_phone_number(mut self, new_value: &str) -> JobUpdateCall<'a, C, A> { self._customer_phone_number = Some(new_value.to_string()); self } - /// Sets the *customer name* query property to the given value. - /// - /// /// Customer name + /// + /// Sets the *customer name* query property to the given value. pub fn customer_name(mut self, new_value: &str) -> JobUpdateCall<'a, C, A> { self._customer_name = Some(new_value.to_string()); self } + /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. + /// /// Append the given value to the *custom field* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. pub fn add_custom_field(mut self, new_value: &str) -> JobUpdateCall<'a, C, A> { self._custom_field.push(new_value.to_string()); self } - /// Sets the *assignee* query property to the given value. - /// - /// /// Assignee email address, or empty string to unassign. + /// + /// Sets the *assignee* query property to the given value. pub fn assignee(mut self, new_value: &str) -> JobUpdateCall<'a, C, A> { self._assignee = Some(new_value.to_string()); self } - /// Sets the *address* query property to the given value. - /// - /// /// Job address as newline (Unix) separated string + /// + /// Sets the *address* query property to the given value. pub fn address(mut self, new_value: &str) -> JobUpdateCall<'a, C, A> { self._address = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1933,8 +1925,8 @@ impl<'a, C, A> JobUpdateCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2189,123 +2181,112 @@ impl<'a, C, A> JobPatchCall<'a, C, A> where C: BorrowMut, A: oaut } + /// /// Sets the *request* property to the given value. /// /// 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) -> JobPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Team ID + /// /// Sets the *team id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Team ID pub fn team_id(mut self, new_value: &str) -> JobPatchCall<'a, C, A> { self._team_id = new_value.to_string(); self } + /// Job number + /// /// Sets the *job id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Job number pub fn job_id(mut self, new_value: &str) -> JobPatchCall<'a, C, A> { self._job_id = new_value.to_string(); self } - /// Sets the *title* query property to the given value. - /// - /// /// Job title + /// + /// Sets the *title* query property to the given value. pub fn title(mut self, new_value: &str) -> JobPatchCall<'a, C, A> { self._title = Some(new_value.to_string()); self } - /// Sets the *progress* query property to the given value. - /// - /// /// Job progress + /// + /// Sets the *progress* query property to the given value. pub fn progress(mut self, new_value: &str) -> JobPatchCall<'a, C, A> { self._progress = Some(new_value.to_string()); self } - /// Sets the *note* query property to the given value. - /// - /// /// Job note as newline (Unix) separated string + /// + /// Sets the *note* query property to the given value. pub fn note(mut self, new_value: &str) -> JobPatchCall<'a, C, A> { self._note = Some(new_value.to_string()); self } - /// Sets the *lng* query property to the given value. - /// - /// /// The longitude coordinate of this job's location. + /// + /// Sets the *lng* query property to the given value. pub fn lng(mut self, new_value: f64) -> JobPatchCall<'a, C, A> { self._lng = Some(new_value); self } - /// Sets the *lat* query property to the given value. - /// - /// /// The latitude coordinate of this job's location. + /// + /// Sets the *lat* query property to the given value. pub fn lat(mut self, new_value: f64) -> JobPatchCall<'a, C, A> { self._lat = Some(new_value); self } - /// Sets the *customer phone number* query property to the given value. - /// - /// /// Customer phone number + /// + /// Sets the *customer phone number* query property to the given value. pub fn customer_phone_number(mut self, new_value: &str) -> JobPatchCall<'a, C, A> { self._customer_phone_number = Some(new_value.to_string()); self } - /// Sets the *customer name* query property to the given value. - /// - /// /// Customer name + /// + /// Sets the *customer name* query property to the given value. pub fn customer_name(mut self, new_value: &str) -> JobPatchCall<'a, C, A> { self._customer_name = Some(new_value.to_string()); self } + /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. + /// /// Append the given value to the *custom field* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. pub fn add_custom_field(mut self, new_value: &str) -> JobPatchCall<'a, C, A> { self._custom_field.push(new_value.to_string()); self } - /// Sets the *assignee* query property to the given value. - /// - /// /// Assignee email address, or empty string to unassign. + /// + /// Sets the *assignee* query property to the given value. pub fn assignee(mut self, new_value: &str) -> JobPatchCall<'a, C, A> { self._assignee = Some(new_value.to_string()); self } - /// Sets the *address* query property to the given value. - /// - /// /// Job address as newline (Unix) separated string + /// + /// Sets the *address* query property to the given value. pub fn address(mut self, new_value: &str) -> JobPatchCall<'a, C, A> { self._address = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2335,8 +2316,8 @@ impl<'a, C, A> JobPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2535,47 +2516,43 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth } + /// Team ID + /// /// Sets the *team id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Team ID pub fn team_id(mut self, new_value: &str) -> JobListCall<'a, C, A> { self._team_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> JobListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *min modified timestamp ms* query property to the given value. - /// - /// /// Minimum time a job was modified in milliseconds since epoch. + /// + /// Sets the *min modified timestamp ms* query property to the given value. pub fn min_modified_timestamp_ms(mut self, new_value: &str) -> JobListCall<'a, C, A> { self._min_modified_timestamp_ms = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return in one page. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> JobListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2605,8 +2582,8 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2842,113 +2819,107 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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) -> JobInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Team ID + /// /// Sets the *team id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Team ID pub fn team_id(mut self, new_value: &str) -> JobInsertCall<'a, C, A> { self._team_id = new_value.to_string(); self } + /// Job address as newline (Unix) separated string + /// /// Sets the *address* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Job address as newline (Unix) separated string pub fn address(mut self, new_value: &str) -> JobInsertCall<'a, C, A> { self._address = new_value.to_string(); self } + /// The latitude coordinate of this job's location. + /// /// Sets the *lat* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The latitude coordinate of this job's location. pub fn lat(mut self, new_value: f64) -> JobInsertCall<'a, C, A> { self._lat = new_value; self } + /// The longitude coordinate of this job's location. + /// /// Sets the *lng* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The longitude coordinate of this job's location. pub fn lng(mut self, new_value: f64) -> JobInsertCall<'a, C, A> { self._lng = new_value; self } + /// Job title + /// /// Sets the *title* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Job title pub fn title(mut self, new_value: &str) -> JobInsertCall<'a, C, A> { self._title = new_value.to_string(); self } - /// Sets the *note* query property to the given value. - /// - /// /// Job note as newline (Unix) separated string + /// + /// Sets the *note* query property to the given value. pub fn note(mut self, new_value: &str) -> JobInsertCall<'a, C, A> { self._note = Some(new_value.to_string()); self } - /// Sets the *customer phone number* query property to the given value. - /// - /// /// Customer phone number + /// + /// Sets the *customer phone number* query property to the given value. pub fn customer_phone_number(mut self, new_value: &str) -> JobInsertCall<'a, C, A> { self._customer_phone_number = Some(new_value.to_string()); self } - /// Sets the *customer name* query property to the given value. - /// - /// /// Customer name + /// + /// Sets the *customer name* query property to the given value. pub fn customer_name(mut self, new_value: &str) -> JobInsertCall<'a, C, A> { self._customer_name = Some(new_value.to_string()); self } + /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. + /// /// Append the given value to the *custom field* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. pub fn add_custom_field(mut self, new_value: &str) -> JobInsertCall<'a, C, A> { self._custom_field.push(new_value.to_string()); self } - /// Sets the *assignee* query property to the given value. - /// - /// /// Assignee email address, or empty string to unassign. + /// + /// Sets the *assignee* query property to the given value. pub fn assignee(mut self, new_value: &str) -> JobInsertCall<'a, C, A> { self._assignee = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2978,8 +2949,8 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3200,74 +3171,69 @@ impl<'a, C, A> ScheduleUpdateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Schedule) -> ScheduleUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Team ID + /// /// Sets the *team id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Team ID pub fn team_id(mut self, new_value: &str) -> ScheduleUpdateCall<'a, C, A> { self._team_id = new_value.to_string(); self } + /// Job number + /// /// Sets the *job id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Job number pub fn job_id(mut self, new_value: &str) -> ScheduleUpdateCall<'a, C, A> { self._job_id = new_value.to_string(); self } - /// Sets the *start time* query property to the given value. - /// - /// /// Scheduled start time in milliseconds since epoch. + /// + /// Sets the *start time* query property to the given value. pub fn start_time(mut self, new_value: &str) -> ScheduleUpdateCall<'a, C, A> { self._start_time = Some(new_value.to_string()); self } - /// Sets the *end time* query property to the given value. - /// - /// /// Scheduled end time in milliseconds since epoch. + /// + /// Sets the *end time* query property to the given value. pub fn end_time(mut self, new_value: &str) -> ScheduleUpdateCall<'a, C, A> { self._end_time = Some(new_value.to_string()); self } - /// Sets the *duration* query property to the given value. - /// - /// /// Job duration in milliseconds. + /// + /// Sets the *duration* query property to the given value. pub fn duration(mut self, new_value: &str) -> ScheduleUpdateCall<'a, C, A> { self._duration = Some(new_value.to_string()); self } - /// Sets the *all day* query property to the given value. - /// - /// /// Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true. + /// + /// Sets the *all day* query property to the given value. pub fn all_day(mut self, new_value: bool) -> ScheduleUpdateCall<'a, C, A> { self._all_day = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ScheduleUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3297,8 +3263,8 @@ impl<'a, C, A> ScheduleUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3519,74 +3485,69 @@ impl<'a, C, A> SchedulePatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Schedule) -> SchedulePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Team ID + /// /// Sets the *team id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Team ID pub fn team_id(mut self, new_value: &str) -> SchedulePatchCall<'a, C, A> { self._team_id = new_value.to_string(); self } + /// Job number + /// /// Sets the *job id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Job number pub fn job_id(mut self, new_value: &str) -> SchedulePatchCall<'a, C, A> { self._job_id = new_value.to_string(); self } - /// Sets the *start time* query property to the given value. - /// - /// /// Scheduled start time in milliseconds since epoch. + /// + /// Sets the *start time* query property to the given value. pub fn start_time(mut self, new_value: &str) -> SchedulePatchCall<'a, C, A> { self._start_time = Some(new_value.to_string()); self } - /// Sets the *end time* query property to the given value. - /// - /// /// Scheduled end time in milliseconds since epoch. + /// + /// Sets the *end time* query property to the given value. pub fn end_time(mut self, new_value: &str) -> SchedulePatchCall<'a, C, A> { self._end_time = Some(new_value.to_string()); self } - /// Sets the *duration* query property to the given value. - /// - /// /// Job duration in milliseconds. + /// + /// Sets the *duration* query property to the given value. pub fn duration(mut self, new_value: &str) -> SchedulePatchCall<'a, C, A> { self._duration = Some(new_value.to_string()); self } - /// Sets the *all day* query property to the given value. - /// - /// /// Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true. + /// + /// Sets the *all day* query property to the given value. pub fn all_day(mut self, new_value: bool) -> SchedulePatchCall<'a, C, A> { self._all_day = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SchedulePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3616,8 +3577,8 @@ impl<'a, C, A> SchedulePatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3803,33 +3764,32 @@ impl<'a, C, A> ScheduleGetCall<'a, C, A> where C: BorrowMut, A: o } + /// Team ID + /// /// Sets the *team id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Team ID pub fn team_id(mut self, new_value: &str) -> ScheduleGetCall<'a, C, A> { self._team_id = new_value.to_string(); self } + /// Job number + /// /// Sets the *job id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Job number pub fn job_id(mut self, new_value: &str) -> ScheduleGetCall<'a, C, A> { self._job_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ScheduleGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3859,8 +3819,8 @@ impl<'a, C, A> ScheduleGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4044,23 +4004,22 @@ impl<'a, C, A> WorkerListCall<'a, C, A> where C: BorrowMut, A: oa } + /// Team ID + /// /// Sets the *team id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Team ID pub fn team_id(mut self, new_value: &str) -> WorkerListCall<'a, C, A> { self._team_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> WorkerListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4090,8 +4049,8 @@ impl<'a, C, A> WorkerListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4289,59 +4248,56 @@ impl<'a, C, A> LocationListCall<'a, C, A> where C: BorrowMut, A: } + /// Team ID + /// /// Sets the *team id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Team ID pub fn team_id(mut self, new_value: &str) -> LocationListCall<'a, C, A> { self._team_id = new_value.to_string(); self } + /// Worker email address. + /// /// Sets the *worker email* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Worker email address. pub fn worker_email(mut self, new_value: &str) -> LocationListCall<'a, C, A> { self._worker_email = new_value.to_string(); self } + /// Start timestamp in milliseconds since the epoch. + /// /// Sets the *start timestamp ms* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Start timestamp in milliseconds since the epoch. pub fn start_timestamp_ms(mut self, new_value: &str) -> LocationListCall<'a, C, A> { self._start_timestamp_ms = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> LocationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return in one page. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> LocationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LocationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4371,8 +4327,8 @@ impl<'a, C, A> LocationListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4545,37 +4501,33 @@ impl<'a, C, A> TeamListCall<'a, C, A> where C: BorrowMut, A: oaut } - /// Sets the *worker* query property to the given value. - /// - /// /// Whether to include teams for which the user has the Worker role. + /// + /// Sets the *worker* query property to the given value. pub fn worker(mut self, new_value: bool) -> TeamListCall<'a, C, A> { self._worker = Some(new_value); self } - /// Sets the *dispatcher* query property to the given value. - /// - /// /// Whether to include teams for which the user has the Dispatcher role. + /// + /// Sets the *dispatcher* query property to the given value. pub fn dispatcher(mut self, new_value: bool) -> TeamListCall<'a, C, A> { self._dispatcher = Some(new_value); self } - /// Sets the *admin* query property to the given value. - /// - /// /// Whether to include teams for which the user has the Admin role. + /// + /// Sets the *admin* query property to the given value. pub fn admin(mut self, new_value: bool) -> TeamListCall<'a, C, A> { self._admin = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TeamListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4605,8 +4557,8 @@ impl<'a, C, A> TeamListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4790,23 +4742,22 @@ impl<'a, C, A> CustomFieldDefListCall<'a, C, A> where C: BorrowMut CustomFieldDefListCall<'a, C, A> { self._team_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CustomFieldDefListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4836,8 +4787,8 @@ impl<'a, C, A> CustomFieldDefListCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/customsearch1/src/lib.rs b/gen/customsearch1/src/lib.rs index 993843e7ee..1516e35e80 100644 --- a/gen/customsearch1/src/lib.rs +++ b/gen/customsearch1/src/lib.rs @@ -129,16 +129,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -305,16 +307,18 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -360,7 +364,7 @@ impl<'a, C, A> Customsearch /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ResultImage { /// no description provided pub width: i32, @@ -396,7 +400,7 @@ impl Part for ResultImage {} /// /// * [list cse](struct.CseListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Search { /// no description provided pub promotions: Vec, @@ -424,7 +428,7 @@ impl ResponseResult for Search {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PromotionImage { /// no description provided pub source: String, @@ -442,7 +446,7 @@ impl Part for PromotionImage {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchUrl { /// no description provided #[serde(rename="type")] @@ -459,7 +463,7 @@ impl Part for SearchUrl {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchSpelling { /// no description provided #[serde(rename="correctedQuery")] @@ -477,7 +481,7 @@ impl Part for SearchSpelling {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PromotionBodyLines { /// no description provided pub url: String, @@ -498,7 +502,7 @@ impl Part for PromotionBodyLines {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ResultType { /// no description provided pub kind: String, @@ -546,7 +550,7 @@ impl Part for ResultType {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Context { /// no description provided pub facets: Vec>, @@ -561,7 +565,7 @@ impl Part for Context {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ContextFacets { /// no description provided pub label_with_op: String, @@ -579,7 +583,7 @@ impl Part for ContextFacets {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Query { /// no description provided #[serde(rename="dateRestrict")] @@ -688,7 +692,7 @@ impl Part for Query {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Promotion { /// no description provided #[serde(rename="bodyLines")] @@ -714,7 +718,7 @@ impl Part for Promotion {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchSearchInformation { /// no description provided #[serde(rename="formattedSearchTime")] @@ -738,7 +742,7 @@ impl Part for SearchSearchInformation {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ResultLabels { /// no description provided #[serde(rename="displayName")] @@ -1148,271 +1152,239 @@ impl<'a, C, A> CseListCall<'a, C, A> where C: BorrowMut, A: oauth } + /// Query + /// /// Sets the *q* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Query pub fn q(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._q = new_value.to_string(); self } - /// Sets the *start* query property to the given value. - /// - /// /// The index of the first result to return + /// + /// Sets the *start* query property to the given value. pub fn start(mut self, new_value: u32) -> CseListCall<'a, C, A> { self._start = Some(new_value); self } - /// Sets the *sort* query property to the given value. - /// - /// /// The sort expression to apply to the results + /// + /// Sets the *sort* query property to the given value. pub fn sort(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._sort = Some(new_value.to_string()); self } - /// Sets the *site search filter* query property to the given value. - /// - /// /// Controls whether to include or exclude results from the site named in the as_sitesearch parameter + /// + /// Sets the *site search filter* query property to the given value. pub fn site_search_filter(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._site_search_filter = Some(new_value.to_string()); self } - /// Sets the *site search* query property to the given value. - /// - /// /// Specifies all search results should be pages from a given site + /// + /// Sets the *site search* query property to the given value. pub fn site_search(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._site_search = Some(new_value.to_string()); self } - /// Sets the *search type* query property to the given value. - /// - /// /// Specifies the search type: image. + /// + /// Sets the *search type* query property to the given value. pub fn search_type(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._search_type = Some(new_value.to_string()); self } - /// Sets the *safe* query property to the given value. - /// - /// /// Search safety level + /// + /// Sets the *safe* query property to the given value. pub fn safe(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._safe = Some(new_value.to_string()); self } - /// Sets the *rights* query property to the given value. - /// - /// /// Filters based on licensing. Supported values include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations of these. + /// + /// Sets the *rights* query property to the given value. pub fn rights(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._rights = Some(new_value.to_string()); self } - /// Sets the *related site* query property to the given value. - /// - /// /// Specifies that all search results should be pages that are related to the specified URL + /// + /// Sets the *related site* query property to the given value. pub fn related_site(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._related_site = Some(new_value.to_string()); self } - /// Sets the *or terms* query property to the given value. - /// - /// /// Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms + /// + /// Sets the *or terms* query property to the given value. pub fn or_terms(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._or_terms = Some(new_value.to_string()); self } - /// Sets the *num* query property to the given value. - /// - /// /// Number of search results to return + /// + /// Sets the *num* query property to the given value. pub fn num(mut self, new_value: u32) -> CseListCall<'a, C, A> { self._num = Some(new_value); self } - /// Sets the *lr* query property to the given value. - /// - /// /// The language restriction for the search results + /// + /// Sets the *lr* query property to the given value. pub fn lr(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._lr = Some(new_value.to_string()); self } - /// Sets the *low range* query property to the given value. - /// - /// /// Creates a range in form as_nlo value..as_nhi value and attempts to append it to query + /// + /// Sets the *low range* query property to the given value. pub fn low_range(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._low_range = Some(new_value.to_string()); self } - /// Sets the *link site* query property to the given value. - /// - /// /// Specifies that all search results should contain a link to a particular URL + /// + /// Sets the *link site* query property to the given value. pub fn link_site(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._link_site = Some(new_value.to_string()); self } - /// Sets the *img type* query property to the given value. - /// - /// /// Returns images of a type, which can be one of: clipart, face, lineart, news, and photo. + /// + /// Sets the *img type* query property to the given value. pub fn img_type(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._img_type = Some(new_value.to_string()); self } - /// Sets the *img size* query property to the given value. - /// - /// /// Returns images of a specified size, where size can be one of: icon, small, medium, large, xlarge, xxlarge, and huge. + /// + /// Sets the *img size* query property to the given value. pub fn img_size(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._img_size = Some(new_value.to_string()); self } - /// Sets the *img dominant color* query property to the given value. - /// - /// /// Returns images of a specific dominant color: yellow, green, teal, blue, purple, pink, white, gray, black and brown. + /// + /// Sets the *img dominant color* query property to the given value. pub fn img_dominant_color(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._img_dominant_color = Some(new_value.to_string()); self } - /// Sets the *img color type* query property to the given value. - /// - /// /// Returns black and white, grayscale, or color images: mono, gray, and color. + /// + /// Sets the *img color type* query property to the given value. pub fn img_color_type(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._img_color_type = Some(new_value.to_string()); self } - /// Sets the *hq* query property to the given value. - /// - /// /// Appends the extra query terms to the query. + /// + /// Sets the *hq* query property to the given value. pub fn hq(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._hq = Some(new_value.to_string()); self } - /// Sets the *hl* query property to the given value. - /// - /// /// Sets the user interface language. + /// + /// Sets the *hl* query property to the given value. pub fn hl(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._hl = Some(new_value.to_string()); self } - /// Sets the *high range* query property to the given value. - /// - /// /// Creates a range in form as_nlo value..as_nhi value and attempts to append it to query + /// + /// Sets the *high range* query property to the given value. pub fn high_range(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._high_range = Some(new_value.to_string()); self } - /// Sets the *googlehost* query property to the given value. - /// - /// /// The local Google domain to use to perform the search. + /// + /// Sets the *googlehost* query property to the given value. pub fn googlehost(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._googlehost = Some(new_value.to_string()); self } - /// Sets the *gl* query property to the given value. - /// - /// /// Geolocation of end user. + /// + /// Sets the *gl* query property to the given value. pub fn gl(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._gl = Some(new_value.to_string()); self } - /// Sets the *filter* query property to the given value. - /// - /// /// Controls turning on or off the duplicate content filter. + /// + /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// Sets the *file type* query property to the given value. - /// - /// /// Returns images of a specified type. Some of the allowed values are: bmp, gif, png, jpg, svg, pdf, ... + /// + /// Sets the *file type* query property to the given value. pub fn file_type(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._file_type = Some(new_value.to_string()); self } - /// Sets the *exclude terms* query property to the given value. - /// - /// /// Identifies a word or phrase that should not appear in any documents in the search results + /// + /// Sets the *exclude terms* query property to the given value. pub fn exclude_terms(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._exclude_terms = Some(new_value.to_string()); self } - /// Sets the *exact terms* query property to the given value. - /// - /// /// Identifies a phrase that all documents in the search results must contain + /// + /// Sets the *exact terms* query property to the given value. pub fn exact_terms(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._exact_terms = Some(new_value.to_string()); self } - /// Sets the *date restrict* query property to the given value. - /// - /// /// Specifies all search results are from a time period + /// + /// Sets the *date restrict* query property to the given value. pub fn date_restrict(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._date_restrict = Some(new_value.to_string()); self } - /// Sets the *cx* query property to the given value. - /// - /// /// The custom search engine ID to scope this search query + /// + /// Sets the *cx* query property to the given value. pub fn cx(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._cx = Some(new_value.to_string()); self } - /// Sets the *cref* query property to the given value. - /// - /// /// The URL of a linked custom search engine + /// + /// Sets the *cref* query property to the given value. pub fn cref(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._cref = Some(new_value.to_string()); self } - /// Sets the *cr* query property to the given value. - /// - /// /// Country restrict(s). + /// + /// Sets the *cr* query property to the given value. pub fn cr(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._cr = Some(new_value.to_string()); self } - /// Sets the *c2coff* query property to the given value. - /// - /// /// Turns off the translation between zh-CN and zh-TW. + /// + /// Sets the *c2coff* query property to the given value. pub fn c2coff(mut self, new_value: &str) -> CseListCall<'a, C, A> { self._c2coff = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CseListCall<'a, C, A> { self._delegate = Some(new_value); self diff --git a/gen/dataflow1_b4/src/cmn.rs b/gen/dataflow1_b4/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/dataflow1_b4/src/cmn.rs +++ b/gen/dataflow1_b4/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/datastore1_beta2/README.md b/gen/datastore1_beta2/README.md index 64306df13e..23c1600b69 100644 --- a/gen/datastore1_beta2/README.md +++ b/gen/datastore1_beta2/README.md @@ -103,16 +103,18 @@ let result = hub.datasets().lookup(&req, "datasetId") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/datastore1_beta2/src/cmn.rs b/gen/datastore1_beta2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/datastore1_beta2/src/cmn.rs +++ b/gen/datastore1_beta2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/datastore1_beta2/src/lib.rs b/gen/datastore1_beta2/src/lib.rs index 529879f800..38c7430755 100644 --- a/gen/datastore1_beta2/src/lib.rs +++ b/gen/datastore1_beta2/src/lib.rs @@ -104,16 +104,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -285,16 +287,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -363,7 +367,7 @@ impl Part for PartitionId {} /// /// * [allocate ids datasets](struct.DatasetAllocateIdCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AllocateIdsResponse { /// The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID. pub keys: Vec, @@ -404,7 +408,7 @@ impl RequestValue for LookupRequest {} /// /// * [begin transaction datasets](struct.DatasetBeginTransactionCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BeginTransactionResponse { /// no description provided pub header: ResponseHeader, @@ -442,7 +446,7 @@ impl RequestValue for AllocateIdsRequest {} /// /// * [run query datasets](struct.DatasetRunQueryCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RunQueryResponse { /// no description provided pub header: ResponseHeader, @@ -486,7 +490,7 @@ impl Part for Mutation {} /// /// * [commit datasets](struct.DatasetCommitCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommitResponse { /// no description provided pub header: ResponseHeader, @@ -502,7 +506,7 @@ impl ResponseResult for CommitResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct QueryResultBatch { /// The state of the query after the current batch. One of notFinished, moreResultsAfterLimit, noMoreResults. #[serde(rename="moreResults")] @@ -541,7 +545,7 @@ impl Part for PropertyReference {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EntityResult { /// The resulting entity. pub entity: Entity, @@ -559,7 +563,7 @@ impl Part for EntityResult {} /// /// * [rollback datasets](struct.DatasetRollbackCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RollbackResponse { /// no description provided pub header: ResponseHeader, @@ -627,7 +631,7 @@ impl Part for PropertyExpression {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MutationResult { /// Keys for insertAutoId entities. One per entity from the request, in the same order. #[serde(rename="insertAutoIdKeys")] @@ -677,7 +681,7 @@ impl Part for PropertyFilter {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ResponseHeader { /// Identifies what kind of resource this is. Value: the fixed string "datastore#responseHeader". pub kind: String, @@ -825,7 +829,7 @@ impl Part for Property {} /// /// * [lookup datasets](struct.DatasetLookupCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LookupResponse { /// Entities found. pub found: Vec, @@ -1387,32 +1391,31 @@ impl<'a, C, A> DatasetCommitCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &CommitRequest) -> DatasetCommitCall<'a, C, A> { self._request = new_value.clone(); self } + /// Identifies the dataset. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetCommitCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetCommitCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1442,8 +1445,8 @@ impl<'a, C, A> DatasetCommitCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1642,32 +1645,31 @@ impl<'a, C, A> DatasetAllocateIdCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &AllocateIdsRequest) -> DatasetAllocateIdCall<'a, C, A> { self._request = new_value.clone(); self } + /// Identifies the dataset. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetAllocateIdCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetAllocateIdCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1697,8 +1699,8 @@ impl<'a, C, A> DatasetAllocateIdCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1897,32 +1899,31 @@ impl<'a, C, A> DatasetRollbackCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &RollbackRequest) -> DatasetRollbackCall<'a, C, A> { self._request = new_value.clone(); self } + /// Identifies the dataset. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetRollbackCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetRollbackCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1952,8 +1953,8 @@ impl<'a, C, A> DatasetRollbackCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2152,32 +2153,31 @@ impl<'a, C, A> DatasetLookupCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &LookupRequest) -> DatasetLookupCall<'a, C, A> { self._request = new_value.clone(); self } + /// Identifies the dataset. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetLookupCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetLookupCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2207,8 +2207,8 @@ impl<'a, C, A> DatasetLookupCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2407,32 +2407,31 @@ impl<'a, C, A> DatasetRunQueryCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &RunQueryRequest) -> DatasetRunQueryCall<'a, C, A> { self._request = new_value.clone(); self } + /// Identifies the dataset. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetRunQueryCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetRunQueryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2462,8 +2461,8 @@ impl<'a, C, A> DatasetRunQueryCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2662,32 +2661,31 @@ impl<'a, C, A> DatasetBeginTransactionCall<'a, C, A> where C: BorrowMut DatasetBeginTransactionCall<'a, C, A> { self._request = new_value.clone(); self } + /// Identifies the dataset. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetBeginTransactionCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetBeginTransactionCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2717,8 +2715,8 @@ impl<'a, C, A> DatasetBeginTransactionCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/deploymentmanager2_beta1/src/cmn.rs b/gen/deploymentmanager2_beta1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/deploymentmanager2_beta1/src/cmn.rs +++ b/gen/deploymentmanager2_beta1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/deploymentmanager2_beta1/src/lib.rs b/gen/deploymentmanager2_beta1/src/lib.rs index 9328b7e6f4..94ef2cc86b 100644 --- a/gen/deploymentmanager2_beta1/src/lib.rs +++ b/gen/deploymentmanager2_beta1/src/lib.rs @@ -111,16 +111,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -288,16 +290,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -361,7 +365,7 @@ impl<'a, C, A> Deploymentmanager /// * [get resources](struct.ResourceGetCall.html) (response) /// * [list resources](struct.ResourceListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ResourceType { /// ! [Output Only] A list of any errors that occurred during deployment. pub errors: Vec, @@ -390,7 +394,7 @@ impl ResponseResult for ResourceType {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationWarningsData { /// ! A key for the warning data. pub key: String, @@ -406,7 +410,7 @@ impl Part for OperationWarningsData {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationWarnings { /// ! Optional human-readable details for this warning. pub message: String, @@ -429,7 +433,7 @@ impl Part for OperationWarnings {} /// /// * [list resources](struct.ResourceListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ResourcesListResponse { /// ! A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -445,7 +449,7 @@ impl ResponseResult for ResourcesListResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationErrorErrors { /// ! An optional, human-readable error message. pub message: String, @@ -469,7 +473,7 @@ impl Part for OperationErrorErrors {} /// * [list manifests](struct.ManifestListCall.html) (none) /// * [get manifests](struct.ManifestGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Manifest { /// ! [Output Only] The fully-expanded configuration file, including any ! templates and references. #[serde(rename="evaluatedConfig")] @@ -493,7 +497,7 @@ impl ResponseResult for Manifest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationError { /// ! The array of errors encountered while processing this operation. pub errors: Vec, @@ -512,7 +516,7 @@ impl Part for OperationError {} /// /// * [list types](struct.TypeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TypesListResponse { /// ! Types supported by Deployment Manager pub types: Vec, @@ -530,7 +534,7 @@ impl ResponseResult for TypesListResponse {} /// /// * [list deployments](struct.DeploymentListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DeploymentsListResponse { /// ! A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -583,7 +587,7 @@ impl ResponseResult for Deployment {} /// /// * [list operations](struct.OperationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationsListResponse { /// ! A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -607,7 +611,7 @@ impl ResponseResult for OperationsListResponse {} /// * [get operations](struct.OperationGetCall.html) (response) /// * [insert deployments](struct.DeploymentInsertCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { /// ! [Output Only] Status of the operation. Can be one of the following: ! "PENDING", "RUNNING", or "DONE". pub status: String, @@ -671,7 +675,7 @@ impl ResponseResult for Operation {} /// /// * [list types](struct.TypeListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Type { /// ! Name of the type. pub name: Option, @@ -689,7 +693,7 @@ impl Resource for Type {} /// /// * [list manifests](struct.ManifestListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ManifestsListResponse { /// ! A token used to continue a truncated list request. #[serde(rename="nextPageToken")] @@ -1304,33 +1308,32 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: } + /// ! The project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The project ID for this request. pub fn project(mut self, new_value: &str) -> OperationGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// ! The name of the operation for this request. + /// /// Sets the *operation* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The name of the operation for this request. pub fn operation(mut self, new_value: &str) -> OperationGetCall<'a, C, A> { self._operation = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OperationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1360,8 +1363,8 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevCloudmanReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1555,39 +1558,36 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: } + /// ! The project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The project ID for this request. pub fn project(mut self, new_value: &str) -> OperationListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// ! Specifies a nextPageToken returned by a previous list request. This ! token can be used to request the next page of results from a previous ! list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> OperationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// ! Maximum count of results to be returned. ! Acceptable values are 0 to 100, inclusive. (Default: 50) + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> OperationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OperationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1617,8 +1617,8 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevCloudmanReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1817,32 +1817,31 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Deployment) -> DeploymentInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// ! The project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The project ID for this request. pub fn project(mut self, new_value: &str) -> DeploymentInsertCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DeploymentInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1872,8 +1871,8 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2059,33 +2058,32 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: } + /// ! The project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The project ID for this request. pub fn project(mut self, new_value: &str) -> DeploymentGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// ! The name of the deployment for this request. + /// /// Sets the *deployment* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> DeploymentGetCall<'a, C, A> { self._deployment = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DeploymentGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2115,8 +2113,8 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevCloudmanReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2310,39 +2308,36 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A } + /// ! The project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The project ID for this request. pub fn project(mut self, new_value: &str) -> DeploymentListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// ! Specifies a nextPageToken returned by a previous list request. This ! token can be used to request the next page of results from a previous ! list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DeploymentListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// ! Maximum count of results to be returned. ! Acceptable values are 0 to 100, inclusive. (Default: 50) + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> DeploymentListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DeploymentListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2372,8 +2367,8 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevCloudmanReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2559,33 +2554,32 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, } + /// ! The project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The project ID for this request. pub fn project(mut self, new_value: &str) -> DeploymentDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// ! The name of the deployment for this request. + /// /// Sets the *deployment* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> DeploymentDeleteCall<'a, C, A> { self._deployment = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DeploymentDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2615,8 +2609,8 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2810,39 +2804,36 @@ impl<'a, C, A> TypeListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// ! The project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The project ID for this request. pub fn project(mut self, new_value: &str) -> TypeListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// ! Specifies a nextPageToken returned by a previous list request. This ! token can be used to request the next page of results from a previous ! list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TypeListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// ! Maximum count of results to be returned. ! Acceptable values are 0 to 100, inclusive. (Default: 50) + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> TypeListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TypeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2872,8 +2863,8 @@ impl<'a, C, A> TypeListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevCloudmanReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3061,43 +3052,42 @@ impl<'a, C, A> ResourceGetCall<'a, C, A> where C: BorrowMut, A: o } + /// ! The project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The project ID for this request. pub fn project(mut self, new_value: &str) -> ResourceGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// ! The name of the deployment for this request. + /// /// Sets the *deployment* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> ResourceGetCall<'a, C, A> { self._deployment = new_value.to_string(); self } + /// ! The name of the resource for this request. + /// /// Sets the *resource* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The name of the resource for this request. pub fn resource(mut self, new_value: &str) -> ResourceGetCall<'a, C, A> { self._resource = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ResourceGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3127,8 +3117,8 @@ impl<'a, C, A> ResourceGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevCloudmanReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3324,49 +3314,46 @@ impl<'a, C, A> ResourceListCall<'a, C, A> where C: BorrowMut, A: } + /// ! The project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The project ID for this request. pub fn project(mut self, new_value: &str) -> ResourceListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// ! The name of the deployment for this request. + /// /// Sets the *deployment* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> ResourceListCall<'a, C, A> { self._deployment = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// ! Specifies a nextPageToken returned by a previous list request. This ! token can be used to request the next page of results from a previous ! list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ResourceListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// ! Maximum count of results to be returned. ! Acceptable values are 0 to 100, inclusive. (Default: 50) + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ResourceListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ResourceListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3396,8 +3383,8 @@ impl<'a, C, A> ResourceListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevCloudmanReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3593,49 +3580,46 @@ impl<'a, C, A> ManifestListCall<'a, C, A> where C: BorrowMut, A: } + /// ! The project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The project ID for this request. pub fn project(mut self, new_value: &str) -> ManifestListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// ! The name of the deployment for this request. + /// /// Sets the *deployment* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> ManifestListCall<'a, C, A> { self._deployment = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// ! Specifies a nextPageToken returned by a previous list request. This ! token can be used to request the next page of results from a previous ! list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ManifestListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// ! Maximum count of results to be returned. ! Acceptable values are 0 to 100, inclusive. (Default: 50) + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManifestListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManifestListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3665,8 +3649,8 @@ impl<'a, C, A> ManifestListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevCloudmanReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3854,43 +3838,42 @@ impl<'a, C, A> ManifestGetCall<'a, C, A> where C: BorrowMut, A: o } + /// ! The project ID for this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The project ID for this request. pub fn project(mut self, new_value: &str) -> ManifestGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// ! The name of the deployment for this request. + /// /// Sets the *deployment* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> ManifestGetCall<'a, C, A> { self._deployment = new_value.to_string(); self } + /// ! The name of the manifest for this request. + /// /// Sets the *manifest* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ! The name of the manifest for this request. pub fn manifest(mut self, new_value: &str) -> ManifestGetCall<'a, C, A> { self._manifest = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManifestGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3920,8 +3903,8 @@ impl<'a, C, A> ManifestGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevCloudmanReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/dfareporting2/README.md b/gen/dfareporting2/README.md index 4b6bf77134..2b67c746ec 100644 --- a/gen/dfareporting2/README.md +++ b/gen/dfareporting2/README.md @@ -214,16 +214,18 @@ let result = hub.reports().list("profileId") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/dfareporting2/src/cmn.rs b/gen/dfareporting2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/dfareporting2/src/cmn.rs +++ b/gen/dfareporting2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/dfareporting2/src/lib.rs b/gen/dfareporting2/src/lib.rs index 3b56197bf8..d66a64ea05 100644 --- a/gen/dfareporting2/src/lib.rs +++ b/gen/dfareporting2/src/lib.rs @@ -215,16 +215,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -391,16 +393,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -592,7 +596,7 @@ impl<'a, C, A> Dfareporting /// /// * [list operating systems](struct.OperatingSystemListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperatingSystemsListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystemsListResponse". pub kind: String, @@ -608,7 +612,7 @@ impl ResponseResult for OperatingSystemsListResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DirectorySiteSettings { /// Whether this site accepts interstitial ads. #[serde(rename="interstitialPlacementAccepted")] @@ -706,7 +710,7 @@ impl ResponseResult for Subaccount {} /// * [list account permission groups](struct.AccountPermissionGroupListCall.html) (none) /// * [get account permission groups](struct.AccountPermissionGroupGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountPermissionGroup { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermissionGroup". pub kind: String, @@ -729,7 +733,7 @@ impl ResponseResult for AccountPermissionGroup {} /// /// * [query dimension values](struct.DimensionValueQueryCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DimensionValueList { /// Continuation token used to page through dimension values. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. The page token is only valid for a limited amount of time and should not be persisted. #[serde(rename="nextPageToken")] @@ -754,7 +758,7 @@ impl ResponseResult for DimensionValueList {} /// /// * [list campaign creative associations](struct.CampaignCreativeAssociationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CampaignCreativeAssociationsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -778,7 +782,7 @@ impl ResponseResult for CampaignCreativeAssociationsListResponse {} /// /// * [list floodlight activities](struct.FloodlightActivityListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FloodlightActivitiesListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -802,7 +806,7 @@ impl ResponseResult for FloodlightActivitiesListResponse {} /// /// * [list user role permission groups](struct.UserRolePermissionGroupListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserRolePermissionGroupsListResponse { /// User role permission group collection. #[serde(rename="userRolePermissionGroups")] @@ -824,7 +828,7 @@ impl ResponseResult for UserRolePermissionGroupsListResponse {} /// * [list files](struct.FileListCall.html) (response) /// * [files list reports](struct.ReportFileListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FileList { /// Continuation token used to page through files. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. The page token is only valid for a limited amount of time and should not be persisted. #[serde(rename="nextPageToken")] @@ -880,7 +884,7 @@ impl Part for EventTagOverride {} /// /// * [get account active ad summaries](struct.AccountActiveAdSummaryGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountActiveAdSummary { /// Ads that can be activated for the account. #[serde(rename="availableAds")] @@ -927,7 +931,7 @@ impl Part for LookbackConfiguration {} /// /// * [generatetag floodlight activities](struct.FloodlightActivityGeneratetagCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FloodlightActivitiesGenerateTagResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivitiesGenerateTagResponse". pub kind: String, @@ -1297,7 +1301,7 @@ impl Part for DayPartTargeting {} /// /// * [compatible fields query reports](struct.ReportCompatibleFieldQueryCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CompatibleFields { /// The kind of resource this is, in this case dfareporting#compatibleFields. pub kind: String, @@ -1386,7 +1390,7 @@ impl Part for ReportCriteria {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CrossDimensionReachReportCompatibleFields { /// Dimensions which are compatible to be selected in the "breakdown" section of the report. pub breakdown: Vec, @@ -1457,7 +1461,7 @@ impl ResponseResult for UserRole {} /// /// * [list event tags](struct.EventTagListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventTagsListResponse { /// Event tag collection. #[serde(rename="eventTags")] @@ -1653,7 +1657,7 @@ impl ResponseResult for Campaign {} /// * [list change logs](struct.ChangeLogListCall.html) (none) /// * [get change logs](struct.ChangeLogGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChangeLog { /// Time when the object was modified. #[serde(rename="changeTime")] @@ -1712,7 +1716,7 @@ impl ResponseResult for ChangeLog {} /// * [files get reports](struct.ReportFileGetCall.html) (response) /// * [run reports](struct.ReportRunCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct File { /// The status of the report file. pub status: String, @@ -1838,7 +1842,7 @@ impl ResponseResult for PlacementStrategy {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlacementTag { /// Tags generated for this placement. #[serde(rename="tagDatas")] @@ -1860,7 +1864,7 @@ impl Part for PlacementTag {} /// /// * [list countries](struct.CountryListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CountriesListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#countriesListResponse". pub kind: String, @@ -1956,7 +1960,7 @@ impl ResponseResult for CampaignCreativeAssociation {} /// /// * [list operating system versions](struct.OperatingSystemVersionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperatingSystemVersionsListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystemVersionsListResponse". pub kind: String, @@ -2139,7 +2143,7 @@ impl ResponseResult for Placement {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FloodlightReportCompatibleFields { /// Metrics which are compatible to be selected in the "metricNames" section of the report. pub metrics: Vec, @@ -2175,7 +2179,7 @@ impl Part for CreativeAssetId {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DirectorySiteContactAssignment { /// ID of this directory site contact. This is a read-only, auto-generated field. #[serde(rename="contactId")] @@ -2301,7 +2305,7 @@ impl Part for DefaultClickThroughEventTagProperties {} /// /// * [list user profiles](struct.UserProfileListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserProfileList { /// The user profiles returned in this response. pub items: Vec, @@ -2323,7 +2327,7 @@ impl ResponseResult for UserProfileList {} /// /// * [list subaccounts](struct.SubaccountListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SubaccountsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -2441,7 +2445,7 @@ impl Resource for PlatformType {} /// /// * [list advertisers](struct.AdvertiserListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdvertisersListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -2604,7 +2608,7 @@ impl Resource for CreativeAsset {} /// /// * [list directory sites](struct.DirectorySiteListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DirectorySitesListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -2641,7 +2645,7 @@ impl Part for LastModifiedInfo {} /// /// * [list regions](struct.RegionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RegionsListResponse { /// Region collection. pub regions: Vec, @@ -2662,7 +2666,7 @@ impl ResponseResult for RegionsListResponse {} /// * [list user role permission groups](struct.UserRolePermissionGroupListCall.html) (none) /// * [get user role permission groups](struct.UserRolePermissionGroupGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserRolePermissionGroup { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermissionGroup". pub kind: String, @@ -2725,7 +2729,7 @@ impl Resource for ConnectionType {} /// /// * [list browsers](struct.BrowserListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BrowsersListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#browsersListResponse". pub kind: String, @@ -2775,7 +2779,7 @@ impl Part for CreativeSettings {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Dimension { /// The kind of resource this is, in this case dfareporting#dimension. pub kind: String, @@ -2837,7 +2841,7 @@ impl ResponseResult for CreativeField {} /// * [get directory sites](struct.DirectorySiteGetCall.html) (response) /// * [list directory sites](struct.DirectorySiteListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DirectorySite { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite". pub kind: String, @@ -2937,7 +2941,7 @@ impl ResponseResult for DirectorySite {} /// /// * [list cities](struct.CityListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CitiesListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#citiesListResponse". pub kind: String, @@ -2998,7 +3002,7 @@ impl ResponseResult for CreativeGroup {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Metric { /// The kind of resource this is, in this case dfareporting#metric. pub kind: String, @@ -3038,7 +3042,7 @@ impl Part for RichMediaExitOverride {} /// /// * [list account permissions](struct.AccountPermissionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountPermissionsListResponse { /// Account permission collection. #[serde(rename="accountPermissions")] @@ -3059,7 +3063,7 @@ impl ResponseResult for AccountPermissionsListResponse {} /// /// * [generatetags placements](struct.PlacementGeneratetagCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlacementsGenerateTagsResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementsGenerateTagsResponse". pub kind: String, @@ -3109,7 +3113,7 @@ impl ResponseResult for CreativeFieldValue {} /// /// * [list floodlight activity groups](struct.FloodlightActivityGroupListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FloodlightActivityGroupsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -3133,7 +3137,7 @@ impl ResponseResult for FloodlightActivityGroupsListResponse {} /// /// * [list directory site contacts](struct.DirectorySiteContactListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DirectorySiteContactsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -3196,7 +3200,7 @@ impl Part for CreativeCustomEvent {} /// /// * [list creatives](struct.CreativeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativesListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -3231,7 +3235,7 @@ impl Part for OmnitureSettings {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PathToConversionReportCompatibleFields { /// Metrics which are compatible to be selected in the "metricNames" section of the report. pub metrics: Vec, @@ -3260,7 +3264,7 @@ impl Part for PathToConversionReportCompatibleFields {} /// /// * [list mobile carriers](struct.MobileCarrierListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MobileCarriersListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#mobileCarriersListResponse". pub kind: String, @@ -3517,7 +3521,7 @@ impl Part for ReportsConfiguration {} /// /// * [list campaigns](struct.CampaignListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CampaignsListResponse { /// Campaign collection. pub campaigns: Vec, @@ -3540,7 +3544,7 @@ impl ResponseResult for CampaignsListResponse {} /// /// * [list user role permissions](struct.UserRolePermissionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserRolePermissionsListResponse { /// User role permission collection. #[serde(rename="userRolePermissions")] @@ -3562,7 +3566,7 @@ impl ResponseResult for UserRolePermissionsListResponse {} /// * [list user profiles](struct.UserProfileListCall.html) (none) /// * [get user profiles](struct.UserProfileGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserProfile { /// The user name. #[serde(rename="userName")] @@ -3657,7 +3661,7 @@ impl Part for ReportPathToConversionCriteria {} /// /// * [list creative fields](struct.CreativeFieldListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeFieldsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -3797,7 +3801,7 @@ impl Part for Recipient {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportCompatibleFields { /// Metrics which are compatible to be selected in the "metricNames" section of the report. pub metrics: Vec, @@ -3825,7 +3829,7 @@ impl Part for ReportCompatibleFields {} /// /// * [list advertiser groups](struct.AdvertiserGroupListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdvertiserGroupsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -3849,7 +3853,7 @@ impl ResponseResult for AdvertiserGroupsListResponse {} /// /// * [list placement groups](struct.PlacementGroupListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlacementGroupsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -4021,7 +4025,7 @@ impl ResponseResult for CreativeAssetMetadata {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TagData { /// Tag string to record a click. #[serde(rename="clickTag")] @@ -4084,7 +4088,7 @@ impl Part for ReportFloodlightCriteria {} /// /// * [list landing pages](struct.LandingPageListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LandingPagesListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#landingPagesListResponse". pub kind: String, @@ -4105,7 +4109,7 @@ impl ResponseResult for LandingPagesListResponse {} /// /// * [list sites](struct.SiteListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SitesListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -4323,7 +4327,7 @@ impl Resource for Browser {} /// /// * [list account user profiles](struct.AccountUserProfileListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountUserProfilesListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -4406,7 +4410,7 @@ impl ResponseResult for Advertiser {} /// /// * [list platform types](struct.PlatformTypeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlatformTypesListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#platformTypesListResponse". pub kind: String, @@ -4427,7 +4431,7 @@ impl ResponseResult for PlatformTypesListResponse {} /// /// * [list change logs](struct.ChangeLogListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChangeLogsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -4451,7 +4455,7 @@ impl ResponseResult for ChangeLogsListResponse {} /// /// * [list placements](struct.PlacementListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlacementsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -4474,7 +4478,7 @@ impl ResponseResult for PlacementsListResponse {} /// /// * [list ads](struct.AdListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -4527,7 +4531,7 @@ impl Part for ReportReachCriteria {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FileUrls { /// The URL for downloading the report data through a browser. #[serde(rename="browserUrl")] @@ -4858,7 +4862,7 @@ impl ResponseResult for UserRolePermission {} /// /// * [list metros](struct.MetroListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MetrosListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#metrosListResponse". pub kind: String, @@ -4915,7 +4919,7 @@ impl Part for PricingSchedule {} /// /// * [list accounts](struct.AccountListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -5001,7 +5005,7 @@ impl Part for SortedDimension {} /// /// * [list placement strategies](struct.PlacementStrategyListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlacementStrategiesListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -5025,7 +5029,7 @@ impl ResponseResult for PlacementStrategiesListResponse {} /// /// * [list reports](struct.ReportListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportList { /// Continuation token used to page through reports. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. The page token is only valid for a limited amount of time and should not be persisted. #[serde(rename="nextPageToken")] @@ -5127,7 +5131,7 @@ impl Part for CreativeOptimizationConfiguration {} /// /// * [list creative groups](struct.CreativeGroupListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeGroupsListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -5322,7 +5326,7 @@ impl ResponseResult for Country {} /// /// * [list postal codes](struct.PostalCodeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostalCodesListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#postalCodesListResponse". pub kind: String, @@ -5435,7 +5439,7 @@ impl ResponseResult for EventTag {} /// /// * [list creative field values](struct.CreativeFieldValueListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeFieldValuesListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -5460,7 +5464,7 @@ impl ResponseResult for CreativeFieldValuesListResponse {} /// * [get directory site contacts](struct.DirectorySiteContactGetCall.html) (response) /// * [list directory site contacts](struct.DirectorySiteContactListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DirectorySiteContact { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySiteContact". pub kind: String, @@ -5524,7 +5528,7 @@ impl Resource for DimensionValue {} /// /// * [list content categories](struct.ContentCategoryListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ContentCategoriesListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -5548,7 +5552,7 @@ impl ResponseResult for ContentCategoriesListResponse {} /// /// * [list floodlight configurations](struct.FloodlightConfigurationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FloodlightConfigurationsListResponse { /// Floodlight configuration collection. #[serde(rename="floodlightConfigurations")] @@ -5605,7 +5609,7 @@ impl Part for PopupWindowProperties {} /// * [list account permissions](struct.AccountPermissionListCall.html) (none) /// * [get account permissions](struct.AccountPermissionGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountPermission { /// Permission group of this account permission. #[serde(rename="permissionGroupId")] @@ -5806,7 +5810,7 @@ impl Part for PlacementAssignment {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReachReportCompatibleFields { /// Metrics which are compatible to be selected in the "metricNames" section of the report. pub metrics: Vec, @@ -5886,7 +5890,7 @@ impl ResponseResult for Site {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DfpSettings { /// DFP network name for this directory site. pub dfp_network_name: String, @@ -5915,7 +5919,7 @@ impl Part for DfpSettings {} /// /// * [list connection types](struct.ConnectionTypeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ConnectionTypesListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#connectionTypesListResponse". pub kind: String, @@ -6032,7 +6036,7 @@ impl Part for DateRange {} /// /// * [list account permission groups](struct.AccountPermissionGroupListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountPermissionGroupsListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermissionGroupsListResponse". pub kind: String, @@ -6053,7 +6057,7 @@ impl ResponseResult for AccountPermissionGroupsListResponse {} /// /// * [list sizes](struct.SizeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SizesListResponse { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#sizesListResponse". pub kind: String, @@ -6073,7 +6077,7 @@ impl ResponseResult for SizesListResponse {} /// /// * [list user roles](struct.UserRoleListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserRolesListResponse { /// Pagination token to be used for the next list operation. #[serde(rename="nextPageToken")] @@ -11575,7 +11579,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// User role permission group ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User role permission group ID. pub fn id(mut self, new_value: &str) -> UserRolePermissionGroupGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserRolePermissionGroupGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11727,8 +11730,8 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserRolePermissionGroupListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11958,8 +11960,8 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeListCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/platformTypes".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -12143,23 +12145,22 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlatformTypeListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlatformTypeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12189,8 +12190,8 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12285,7 +12286,7 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12444,8 +12444,8 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/creativeFields".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -12672,81 +12672,73 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for creative fields by name or ID. Wildcards (*) are allowed. For example, "creativefield*2015" will return creative fields with names like "creativefield June 2015", "creativefield April 2015", or simply "creativefield 2015". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of "creativefield" will match creative fields with the name "my creativefield", "creativefield 2015", or simply "creativefield". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> CreativeFieldListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only creative fields with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only creative fields with these IDs. pub fn add_ids(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } + /// Select only creative fields that belong to these advertisers. + /// /// Append the given value to the *advertiser ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only creative fields that belong to these advertisers. pub fn add_advertiser_ids(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, A> { self._advertiser_ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12776,8 +12768,8 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12866,7 +12858,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative Field ID + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative Field ID pub fn id(mut self, new_value: &str) -> CreativeFieldDeleteCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13008,8 +12999,8 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/creativeFields/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -13195,33 +13186,32 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative Field ID + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative Field ID pub fn id(mut self, new_value: &str) -> CreativeFieldGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13251,8 +13241,8 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13347,7 +13337,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13506,8 +13495,8 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative Field ID + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative Field ID pub fn id(mut self, new_value: &str) -> CreativeFieldPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13773,8 +13761,8 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/userRoles".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -13973,32 +13961,31 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &UserRole) -> UserRoleInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRoleInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserRoleInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14028,8 +14015,8 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14119,7 +14106,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/userRoles/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -14215,33 +14202,32 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRoleGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// User role ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User role ID. pub fn id(mut self, new_value: &str) -> UserRoleGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserRoleGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14271,8 +14257,8 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14367,7 +14353,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/userRoles".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -14471,32 +14457,31 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &UserRole) -> UserRoleUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRoleUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserRoleUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14526,8 +14511,8 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14616,7 +14601,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/userRoles/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -14702,33 +14687,32 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRoleDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// User role ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User role ID. pub fn id(mut self, new_value: &str) -> UserRoleDeleteCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserRoleDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14758,8 +14742,8 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14856,7 +14840,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/userRoles".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -14960,42 +14944,41 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &UserRole) -> UserRolePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRolePatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// User role ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User role ID. pub fn id(mut self, new_value: &str) -> UserRolePatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserRolePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15025,8 +15008,8 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15158,7 +15141,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/userRoles".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -15254,88 +15237,79 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRoleListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *subaccount id* query property to the given value. - /// - /// /// Select only user roles that belong to this subaccount. + /// + /// Sets the *subaccount id* query property to the given value. pub fn subaccount_id(mut self, new_value: &str) -> UserRoleListCall<'a, C, A> { self._subaccount_id = Some(new_value.to_string()); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> UserRoleListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> UserRoleListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "userrole*2015" will return objects with names like "userrole June 2015", "userrole April 2015", or simply "userrole 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "userrole" will match objects with name "my userrole", "userrole 2015", or simply "userrole". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> UserRoleListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> UserRoleListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> UserRoleListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only user roles with the specified IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only user roles with the specified IDs. pub fn add_ids(mut self, new_value: &str) -> UserRoleListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *account user role only* query property to the given value. - /// - /// /// Select only account level user roles not associated with any specific subaccount. + /// + /// Sets the *account user role only* query property to the given value. pub fn account_user_role_only(mut self, new_value: bool) -> UserRoleListCall<'a, C, A> { self._account_user_role_only = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserRoleListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15365,8 +15339,8 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15454,7 +15428,7 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OperatingSystemVersionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15596,8 +15569,8 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{campaignId}", "campaignId"), ("{id}", "id")].iter() { @@ -15785,43 +15758,42 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPageGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Landing page campaign ID. + /// /// Sets the *campaign id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPageGetCall<'a, C, A> { self._campaign_id = new_value.to_string(); self } + /// Landing page ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Landing page ID. pub fn id(mut self, new_value: &str) -> LandingPageGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LandingPageGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15851,8 +15823,8 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15949,7 +15921,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{campaignId}", "campaignId")].iter() { @@ -16053,42 +16025,41 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &LandingPage) -> LandingPageUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPageUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Landing page campaign ID. + /// /// Sets the *campaign id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPageUpdateCall<'a, C, A> { self._campaign_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LandingPageUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16118,8 +16089,8 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16209,7 +16180,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{campaignId}", "campaignId")].iter() { @@ -16305,33 +16276,32 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPageListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Landing page campaign ID. + /// /// Sets the *campaign id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPageListCall<'a, C, A> { self._campaign_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LandingPageListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16361,8 +16331,8 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16459,7 +16429,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{campaignId}", "campaignId")].iter() { @@ -16563,42 +16533,41 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &LandingPage) -> LandingPageInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPageInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Landing page campaign ID. + /// /// Sets the *campaign id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPageInsertCall<'a, C, A> { self._campaign_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LandingPageInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16628,8 +16597,8 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16728,7 +16697,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{campaignId}", "campaignId")].iter() { @@ -16832,52 +16801,51 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &LandingPage) -> LandingPagePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPagePatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Landing page campaign ID. + /// /// Sets the *campaign id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPagePatchCall<'a, C, A> { self._campaign_id = new_value.to_string(); self } + /// Landing page ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Landing page ID. pub fn id(mut self, new_value: &str) -> LandingPagePatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LandingPagePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16907,8 +16875,8 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16999,7 +16967,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{campaignId}", "campaignId"), ("{id}", "id")].iter() { @@ -17085,43 +17053,42 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPageDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Landing page campaign ID. + /// /// Sets the *campaign id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPageDeleteCall<'a, C, A> { self._campaign_id = new_value.to_string(); self } + /// Landing page ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Landing page ID. pub fn id(mut self, new_value: &str) -> LandingPageDeleteCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LandingPageDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17151,8 +17118,8 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17249,7 +17216,7 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{campaignId}", "campaignId")].iter() { @@ -17353,42 +17320,41 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu } + /// /// Sets the *request* property to the given value. /// /// 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: &CampaignCreativeAssociation) -> CampaignCreativeAssociationInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignCreativeAssociationInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Campaign ID in this association. + /// /// Sets the *campaign id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Campaign ID in this association. pub fn campaign_id(mut self, new_value: &str) -> CampaignCreativeAssociationInsertCall<'a, C, A> { self._campaign_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CampaignCreativeAssociationInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17418,8 +17384,8 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17524,7 +17490,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{campaignId}", "campaignId")].iter() { @@ -17620,57 +17586,53 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignCreativeAssociationListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Campaign ID in this association. + /// /// Sets the *campaign id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Campaign ID in this association. pub fn campaign_id(mut self, new_value: &str) -> CampaignCreativeAssociationListCall<'a, C, A> { self._campaign_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CampaignCreativeAssociationListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CampaignCreativeAssociationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> CampaignCreativeAssociationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CampaignCreativeAssociationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17700,8 +17662,8 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17851,7 +17813,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/changeLogs".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -17947,106 +17909,95 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ChangeLogListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Select only change logs with these user profile IDs. + /// /// Append the given value to the *user profile ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only change logs with these user profile IDs. pub fn add_user_profile_ids(mut self, new_value: &str) -> ChangeLogListCall<'a, C, A> { self._user_profile_ids.push(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Select only change logs whose object ID, user name, old or new values match the search string. + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> ChangeLogListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ChangeLogListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *object type* query property to the given value. - /// - /// /// Select only change logs with the specified object type. + /// + /// Sets the *object type* query property to the given value. pub fn object_type(mut self, new_value: &str) -> ChangeLogListCall<'a, C, A> { self._object_type = Some(new_value.to_string()); self } + /// Select only change logs with these object IDs. + /// /// Append the given value to the *object ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only change logs with these object IDs. pub fn add_object_ids(mut self, new_value: &str) -> ChangeLogListCall<'a, C, A> { self._object_ids.push(new_value.to_string()); self } - /// Sets the *min change time* query property to the given value. - /// - /// /// Select only change logs whose change time is before the specified minChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset. + /// + /// Sets the *min change time* query property to the given value. pub fn min_change_time(mut self, new_value: &str) -> ChangeLogListCall<'a, C, A> { self._min_change_time = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ChangeLogListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *max change time* query property to the given value. - /// - /// /// Select only change logs whose change time is before the specified maxChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset. + /// + /// Sets the *max change time* query property to the given value. pub fn max_change_time(mut self, new_value: &str) -> ChangeLogListCall<'a, C, A> { self._max_change_time = Some(new_value.to_string()); self } + /// Select only change logs with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only change logs with these IDs. pub fn add_ids(mut self, new_value: &str) -> ChangeLogListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *action* query property to the given value. - /// - /// /// Select only change logs with the specified action. + /// + /// Sets the *action* query property to the given value. pub fn action(mut self, new_value: &str) -> ChangeLogListCall<'a, C, A> { self._action = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChangeLogListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18076,8 +18027,8 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18167,7 +18118,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/changeLogs/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -18263,33 +18214,32 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ChangeLogGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Change log ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Change log ID. pub fn id(mut self, new_value: &str) -> ChangeLogGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChangeLogGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18319,8 +18269,8 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18410,7 +18360,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/accounts/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -18506,33 +18456,32 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Account ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID. pub fn id(mut self, new_value: &str) -> AccountGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18562,8 +18511,8 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18690,7 +18639,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/accounts".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -18786,80 +18735,72 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AccountListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> AccountListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "account*2015" will return objects with names like "account June 2015", "account April 2015", or simply "account 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "account" will match objects with name "my account", "account 2015", or simply "account". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> AccountListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only accounts with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only accounts with these IDs. pub fn add_ids(mut self, new_value: &str) -> AccountListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *active* query property to the given value. - /// - /// /// Select only active accounts. Don't set this field to select both active and non-active accounts. + /// + /// Sets the *active* query property to the given value. pub fn active(mut self, new_value: bool) -> AccountListCall<'a, C, A> { self._active = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18889,8 +18830,8 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18985,7 +18926,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/accounts".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -19089,32 +19030,31 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Account) -> AccountUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19144,8 +19084,8 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -19242,7 +19182,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/accounts".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -19346,42 +19286,41 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Account) -> AccountPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Account ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID. pub fn id(mut self, new_value: &str) -> AccountPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19411,8 +19350,8 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -19500,7 +19439,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/postalCodes".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -19596,23 +19535,22 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PostalCodeListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PostalCodeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19642,8 +19580,8 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -19738,7 +19676,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/advertisers".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -19842,32 +19780,31 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Advertiser) -> AdvertiserInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19897,8 +19834,8 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -19995,7 +19932,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/advertisers".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -20099,42 +20036,41 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Advertiser) -> AdvertiserPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Advertiser ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Advertiser ID. pub fn id(mut self, new_value: &str) -> AdvertiserPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -20164,8 +20100,8 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -20325,7 +20261,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/advertisers".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -20421,122 +20357,109 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *subaccount id* query property to the given value. - /// - /// /// Select only advertisers with these subaccount IDs. + /// + /// Sets the *subaccount id* query property to the given value. pub fn subaccount_id(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._subaccount_id = Some(new_value.to_string()); self } - /// Sets the *status* query property to the given value. - /// - /// /// Select only advertisers with the specified status. + /// + /// Sets the *status* query property to the given value. pub fn status(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._status = Some(new_value.to_string()); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser June 2015", "advertiser April 2015", or simply "advertiser 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "advertiser" will match objects with name "my advertiser", "advertiser 2015", or simply "advertiser". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *only parent* query property to the given value. - /// - /// /// Select only advertisers which use another advertiser's floodlight configuration. + /// + /// Sets the *only parent* query property to the given value. pub fn only_parent(mut self, new_value: bool) -> AdvertiserListCall<'a, C, A> { self._only_parent = Some(new_value); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AdvertiserListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *include advertisers without groups only* query property to the given value. - /// - /// /// Select only advertisers which do not belong to any advertiser group. + /// + /// Sets the *include advertisers without groups only* query property to the given value. pub fn include_advertisers_without_groups_only(mut self, new_value: bool) -> AdvertiserListCall<'a, C, A> { self._include_advertisers_without_groups_only = Some(new_value); self } + /// Select only advertisers with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only advertisers with these IDs. pub fn add_ids(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } + /// Select only advertisers with these floodlight configuration IDs. + /// /// Append the given value to the *floodlight configuration ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only advertisers with these floodlight configuration IDs. pub fn add_floodlight_configuration_ids(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._floodlight_configuration_ids.push(new_value.to_string()); self } + /// Select only advertisers with these advertiser group IDs. + /// /// Append the given value to the *advertiser group ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only advertisers with these advertiser group IDs. pub fn add_advertiser_group_ids(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._advertiser_group_ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -20566,8 +20489,8 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -20662,7 +20585,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/advertisers".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -20766,32 +20689,31 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Advertiser) -> AdvertiserUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -20821,8 +20743,8 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -20912,7 +20834,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/advertisers/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -21008,33 +20930,32 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Advertiser ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Advertiser ID. pub fn id(mut self, new_value: &str) -> AdvertiserGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21064,8 +20985,8 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -21274,48 +21195,45 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut DimensionValueQueryCall<'a, C, A> { self._request = new_value.clone(); self } + /// The DFA user profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> DimensionValueQueryCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of the nextToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DimensionValueQueryCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> DimensionValueQueryCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DimensionValueQueryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21345,8 +21263,8 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Floodlight activity Group ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Floodlight activity Group ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityGroupDeleteCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityGroupDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21577,8 +21494,8 @@ impl<'a, C, A> FloodlightActivityGroupDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Floodlight activity Group ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Floodlight activity Group ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityGroupGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityGroupGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -21820,8 +21736,8 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityGroupPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Floodlight activity Group ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Floodlight activity Group ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityGroupPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityGroupPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22087,8 +22002,8 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *type* query property to the given value. - /// - /// /// Select only floodlight activity groups with the specified floodlight activity group type. + /// + /// Sets the *type* query property to the given value. pub fn type_(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, A> { self._type_ = Some(new_value.to_string()); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivitygroup*2015" will return objects with names like "floodlightactivitygroup June 2015", "floodlightactivitygroup April 2015", or simply "floodlightactivitygroup 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivitygroup" will match objects with name "my floodlightactivitygroup activity", "floodlightactivitygroup 2015", or simply "floodlightactivitygroup". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> FloodlightActivityGroupListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result. pub fn add_ids(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *floodlight configuration id* query property to the given value. - /// - /// /// Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result. + /// + /// Sets the *floodlight configuration id* query property to the given value. pub fn floodlight_configuration_id(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, A> { self._floodlight_configuration_id = Some(new_value.to_string()); self } - /// Sets the *advertiser id* query property to the given value. - /// - /// /// Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result. + /// + /// Sets the *advertiser id* query property to the given value. pub fn advertiser_id(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, A> { self._advertiser_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityGroupListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22440,8 +22345,8 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityGroupInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityGroupInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22695,8 +22599,8 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityGroupUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityGroupUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -22950,8 +22853,8 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/metros".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -23135,23 +23038,22 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> MetroListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MetroListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23181,8 +23083,8 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -23272,7 +23174,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Directory site contact ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Directory site contact ID. pub fn id(mut self, new_value: &str) -> DirectorySiteContactGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DirectorySiteContactGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23424,8 +23325,8 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, "directory site contact*2015" will return objects with names like "directory site contact June 2015", "directory site contact April 2015", or simply "directory site contact 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "directory site contact" will match objects with name "my directory site contact", "directory site contact 2015", or simply "directory site contact". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> DirectorySiteContactListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only directory site contacts with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only directory site contacts with these IDs. pub fn add_ids(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } + /// Select only directory site contacts with these directory site IDs. This is a required field. + /// /// Append the given value to the *directory site ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only directory site contacts with these directory site IDs. This is a required field. pub fn add_directory_site_ids(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, A> { self._directory_site_ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DirectorySiteContactListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23756,8 +23649,8 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserProfileListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -23951,8 +23843,8 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -24136,23 +24028,22 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A } + /// The user profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The user profile ID. pub fn profile_id(mut self, new_value: &str) -> UserProfileGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserProfileGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -24182,8 +24073,8 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -24280,7 +24171,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/ads".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -24384,42 +24275,41 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth } + /// /// Sets the *request* property to the given value. /// /// 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: &Ad) -> AdPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Ad ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad ID. pub fn id(mut self, new_value: &str) -> AdPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -24449,8 +24339,8 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -24545,7 +24435,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/ads".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -24649,32 +24539,31 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut } + /// /// Sets the *request* property to the given value. /// /// 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: &Ad) -> AdInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -24704,8 +24593,8 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -24953,7 +24842,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/ads".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -25049,225 +24938,200 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Select only ads with these types. + /// /// Append the given value to the *type* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only ads with these types. pub fn add_type(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._type_.push(new_value.to_string()); self } - /// Sets the *ssl required* query property to the given value. - /// - /// /// Select only ads that require SSL. + /// + /// Sets the *ssl required* query property to the given value. pub fn ssl_required(mut self, new_value: bool) -> AdListCall<'a, C, A> { self._ssl_required = Some(new_value); self } - /// Sets the *ssl compliant* query property to the given value. - /// - /// /// Select only ads that are SSL-compliant. + /// + /// Sets the *ssl compliant* query property to the given value. pub fn ssl_compliant(mut self, new_value: bool) -> AdListCall<'a, C, A> { self._ssl_compliant = Some(new_value); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } + /// Select only ads with these size IDs. + /// /// Append the given value to the *size ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only ads with these size IDs. pub fn add_size_ids(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._size_ids.push(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "ad*2015" will return objects with names like "ad June 2015", "ad April 2015", or simply "ad 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "ad" will match objects with name "my ad", "ad 2015", or simply "ad". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } + /// Select only ads whose list targeting expression use these remarketing list IDs. + /// /// Append the given value to the *remarketing list ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only ads whose list targeting expression use these remarketing list IDs. pub fn add_remarketing_list_ids(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._remarketing_list_ids.push(new_value.to_string()); self } + /// Select only ads with these placement IDs assigned. + /// /// Append the given value to the *placement ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only ads with these placement IDs assigned. pub fn add_placement_ids(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._placement_ids.push(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *overridden event tag id* query property to the given value. - /// - /// /// Select only ads with this event tag override ID. + /// + /// Sets the *overridden event tag id* query property to the given value. pub fn overridden_event_tag_id(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._overridden_event_tag_id = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AdListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only ads with these landing page IDs. + /// /// Append the given value to the *landing page ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only ads with these landing page IDs. pub fn add_landing_page_ids(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._landing_page_ids.push(new_value.to_string()); self } + /// Select only ads with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only ads with these IDs. pub fn add_ids(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *dynamic click tracker* query property to the given value. - /// - /// /// Select only dynamic click trackers. Applicable when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers. If false, select static click trackers. Leave unset to select both. + /// + /// Sets the *dynamic click tracker* query property to the given value. pub fn dynamic_click_tracker(mut self, new_value: bool) -> AdListCall<'a, C, A> { self._dynamic_click_tracker = Some(new_value); self } - /// Sets the *creative type* query property to the given value. - /// - /// /// Select only ads with the specified creativeType. + /// + /// Sets the *creative type* query property to the given value. pub fn creative_type(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._creative_type = Some(new_value.to_string()); self } + /// Select only ads with these creative optimization configuration IDs. + /// /// Append the given value to the *creative optimization configuration ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only ads with these creative optimization configuration IDs. pub fn add_creative_optimization_configuration_ids(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._creative_optimization_configuration_ids.push(new_value.to_string()); self } + /// Select only ads with these creative IDs assigned. + /// /// Append the given value to the *creative ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only ads with these creative IDs assigned. pub fn add_creative_ids(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._creative_ids.push(new_value.to_string()); self } - /// Sets the *compatibility* query property to the given value. - /// - /// /// Select default ads with the specified compatibility. Applicable when type is AD_SERVING_DEFAULT_AD. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an in-stream video ads developed with the VAST standard. + /// + /// Sets the *compatibility* query property to the given value. pub fn compatibility(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._compatibility = Some(new_value.to_string()); self } + /// Select only ads with these campaign IDs. + /// /// Append the given value to the *campaign ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only ads with these campaign IDs. pub fn add_campaign_ids(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._campaign_ids.push(new_value.to_string()); self } + /// Select only ads with these audience segment IDs. + /// /// Append the given value to the *audience segment ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only ads with these audience segment IDs. pub fn add_audience_segment_ids(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._audience_segment_ids.push(new_value.to_string()); self } - /// Sets the *archived* query property to the given value. - /// - /// /// Select only archived ads. + /// + /// Sets the *archived* query property to the given value. pub fn archived(mut self, new_value: bool) -> AdListCall<'a, C, A> { self._archived = Some(new_value); self } - /// Sets the *advertiser id* query property to the given value. - /// - /// /// Select only ads with this advertiser ID. + /// + /// Sets the *advertiser id* query property to the given value. pub fn advertiser_id(mut self, new_value: &str) -> AdListCall<'a, C, A> { self._advertiser_id = Some(new_value.to_string()); self } - /// Sets the *active* query property to the given value. - /// - /// /// Select only active ads. + /// + /// Sets the *active* query property to the given value. pub fn active(mut self, new_value: bool) -> AdListCall<'a, C, A> { self._active = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -25297,8 +25161,8 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -25388,7 +25252,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/ads/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -25484,33 +25348,32 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Ad ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Ad ID. pub fn id(mut self, new_value: &str) -> AdGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -25540,8 +25403,8 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -25636,7 +25499,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/ads".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -25740,32 +25603,31 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut } + /// /// Sets the *request* property to the given value. /// /// 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: &Ad) -> AdUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -25795,8 +25657,8 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -25886,7 +25748,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Account permission ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account permission ID. pub fn id(mut self, new_value: &str) -> AccountPermissionGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountPermissionGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -26038,8 +25899,8 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountPermissionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -26269,8 +26129,8 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ConnectionTypeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -26500,8 +26359,8 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Advertiser group ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Advertiser group ID. pub fn id(mut self, new_value: &str) -> AdvertiserGroupGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserGroupGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -26743,8 +26601,8 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AdvertiserGroupListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> AdvertiserGroupListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser group June 2015", "advertiser group April 2015", or simply "advertiser group 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "advertisergroup" will match objects with name "my advertisergroup", "advertisergroup 2015", or simply "advertisergroup". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> AdvertiserGroupListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AdvertiserGroupListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AdvertiserGroupListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only advertiser groups with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only advertiser groups with these IDs. pub fn add_ids(mut self, new_value: &str) -> AdvertiserGroupListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserGroupListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -27057,8 +26908,8 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserGroupInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserGroupInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -27312,8 +27162,8 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserGroupUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserGroupUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -27567,8 +27416,8 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserGroupPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Advertiser group ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Advertiser group ID. pub fn id(mut self, new_value: &str) -> AdvertiserGroupPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserGroupPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -27834,8 +27682,8 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Advertiser group ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Advertiser group ID. pub fn id(mut self, new_value: &str) -> AdvertiserGroupDeleteCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserGroupDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -28066,8 +27913,8 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/sites".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -28266,32 +28113,31 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Site) -> SiteInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SiteInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SiteInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -28321,8 +28167,8 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -28412,7 +28258,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/sites/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -28508,33 +28354,32 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SiteGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Site ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Site ID. pub fn id(mut self, new_value: &str) -> SiteGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SiteGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -28564,8 +28409,8 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -28740,7 +28585,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/sites".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -28836,146 +28681,130 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SiteListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *unmapped site* query property to the given value. - /// - /// /// Select only sites that have not been mapped to a directory site. + /// + /// Sets the *unmapped site* query property to the given value. pub fn unmapped_site(mut self, new_value: bool) -> SiteListCall<'a, C, A> { self._unmapped_site = Some(new_value); self } - /// Sets the *subaccount id* query property to the given value. - /// - /// /// Select only sites with this subaccount ID. + /// + /// Sets the *subaccount id* query property to the given value. pub fn subaccount_id(mut self, new_value: &str) -> SiteListCall<'a, C, A> { self._subaccount_id = Some(new_value.to_string()); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> SiteListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> SiteListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name, ID or keyName. Wildcards (*) are allowed. For example, "site*2015" will return objects with names like "site June 2015", "site April 2015", or simply "site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "site" will match objects with name "my site", "site 2015", or simply "site". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> SiteListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> SiteListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> SiteListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only sites with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only sites with these IDs. pub fn add_ids(mut self, new_value: &str) -> SiteListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } + /// Select only sites with these directory site IDs. + /// /// Append the given value to the *directory site ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only sites with these directory site IDs. pub fn add_directory_site_ids(mut self, new_value: &str) -> SiteListCall<'a, C, A> { self._directory_site_ids.push(new_value.to_string()); self } + /// Select only sites with these campaign IDs. + /// /// Append the given value to the *campaign ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only sites with these campaign IDs. pub fn add_campaign_ids(mut self, new_value: &str) -> SiteListCall<'a, C, A> { self._campaign_ids.push(new_value.to_string()); self } - /// Sets the *approved* query property to the given value. - /// - /// /// Select only approved sites. + /// + /// Sets the *approved* query property to the given value. pub fn approved(mut self, new_value: bool) -> SiteListCall<'a, C, A> { self._approved = Some(new_value); self } - /// Sets the *ad words site* query property to the given value. - /// - /// /// Select only AdWords sites. + /// + /// Sets the *ad words site* query property to the given value. pub fn ad_words_site(mut self, new_value: bool) -> SiteListCall<'a, C, A> { self._ad_words_site = Some(new_value); self } - /// Sets the *accepts publisher paid placements* query property to the given value. - /// - /// /// Select only sites that accept publisher paid placements. + /// + /// Sets the *accepts publisher paid placements* query property to the given value. pub fn accepts_publisher_paid_placements(mut self, new_value: bool) -> SiteListCall<'a, C, A> { self._accepts_publisher_paid_placements = Some(new_value); self } - /// Sets the *accepts interstitial placements* query property to the given value. - /// - /// /// This search filter is no longer supported and will have no effect on the results returned. + /// + /// Sets the *accepts interstitial placements* query property to the given value. pub fn accepts_interstitial_placements(mut self, new_value: bool) -> SiteListCall<'a, C, A> { self._accepts_interstitial_placements = Some(new_value); self } - /// Sets the *accepts in stream video placements* query property to the given value. - /// - /// /// This search filter is no longer supported and will have no effect on the results returned. + /// + /// Sets the *accepts in stream video placements* query property to the given value. pub fn accepts_in_stream_video_placements(mut self, new_value: bool) -> SiteListCall<'a, C, A> { self._accepts_in_stream_video_placements = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SiteListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -29005,8 +28834,8 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -29101,7 +28930,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/sites".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -29205,32 +29034,31 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Site) -> SiteUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SiteUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SiteUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -29260,8 +29088,8 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -29358,7 +29186,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/sites".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -29462,42 +29290,41 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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: &Site) -> SitePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SitePatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Site ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Site ID. pub fn id(mut self, new_value: &str) -> SitePatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SitePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -29527,8 +29354,8 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -29618,7 +29445,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Floodlight activity ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Floodlight activity ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -29770,8 +29596,8 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *tag string* query property to the given value. - /// - /// /// Select only floodlight activities with the specified tag string. + /// + /// Sets the *tag string* query property to the given value. pub fn tag_string(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._tag_string = Some(new_value.to_string()); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivity*2015" will return objects with names like "floodlightactivity June 2015", "floodlightactivity April 2015", or simply "floodlightactivity 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivity" will match objects with name "my floodlightactivity activity", "floodlightactivity 2015", or simply "floodlightactivity". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> FloodlightActivityListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. pub fn add_ids(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *floodlight configuration id* query property to the given value. - /// - /// /// Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. + /// + /// Sets the *floodlight configuration id* query property to the given value. pub fn floodlight_configuration_id(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._floodlight_configuration_id = Some(new_value.to_string()); self } - /// Sets the *floodlight activity group type* query property to the given value. - /// - /// /// Select only floodlight activities with the specified floodlight activity group type. + /// + /// Sets the *floodlight activity group type* query property to the given value. pub fn floodlight_activity_group_type(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._floodlight_activity_group_type = Some(new_value.to_string()); self } - /// Sets the *floodlight activity group tag string* query property to the given value. - /// - /// /// Select only floodlight activities with the specified floodlight activity group tag string. + /// + /// Sets the *floodlight activity group tag string* query property to the given value. pub fn floodlight_activity_group_tag_string(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._floodlight_activity_group_tag_string = Some(new_value.to_string()); self } - /// Sets the *floodlight activity group name* query property to the given value. - /// - /// /// Select only floodlight activities with the specified floodlight activity group name. + /// + /// Sets the *floodlight activity group name* query property to the given value. pub fn floodlight_activity_group_name(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._floodlight_activity_group_name = Some(new_value.to_string()); self } + /// Select only floodlight activities with the specified floodlight activity group IDs. + /// /// Append the given value to the *floodlight activity group ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only floodlight activities with the specified floodlight activity group IDs. pub fn add_floodlight_activity_group_ids(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._floodlight_activity_group_ids.push(new_value.to_string()); self } - /// Sets the *advertiser id* query property to the given value. - /// - /// /// Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. + /// + /// Sets the *advertiser id* query property to the given value. pub fn advertiser_id(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, A> { self._advertiser_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -30180,8 +29992,8 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -30435,8 +30246,8 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Floodlight activity ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Floodlight activity ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityDeleteCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -30667,8 +30477,8 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Floodlight activity ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Floodlight activity ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -30934,8 +30743,8 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *floodlight activity id* query property to the given value. - /// - /// /// Floodlight activity ID for which we want to generate a tag. + /// + /// Sets the *floodlight activity id* query property to the given value. pub fn floodlight_activity_id(mut self, new_value: &str) -> FloodlightActivityGeneratetagCall<'a, C, A> { self._floodlight_activity_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityGeneratetagCall<'a, C, A> { self._delegate = Some(new_value); self @@ -31178,8 +30985,8 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightActivityUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -31433,8 +31239,8 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/regions".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -31618,23 +31424,22 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> RegionListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RegionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -31664,8 +31469,8 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -31760,7 +31565,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGroupInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeGroupInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -31919,8 +31723,8 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/creativeGroups/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -32106,33 +31910,32 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGroupGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative group ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative group ID. pub fn id(mut self, new_value: &str) -> CreativeGroupGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeGroupGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -32162,8 +31965,8 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -32258,7 +32061,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGroupUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeGroupUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -32417,8 +32219,8 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/creativeGroups".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -32650,89 +32452,80 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for creative groups by name or ID. Wildcards (*) are allowed. For example, "creativegroup*2015" will return creative groups with names like "creativegroup June 2015", "creativegroup April 2015", or simply "creativegroup 2015". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of "creativegroup" will match creative groups with the name "my creativegroup", "creativegroup 2015", or simply "creativegroup". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> CreativeGroupListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only creative groups with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only creative groups with these IDs. pub fn add_ids(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *group number* query property to the given value. - /// - /// /// Select only creative groups that belong to this subgroup. + /// + /// Sets the *group number* query property to the given value. pub fn group_number(mut self, new_value: i32) -> CreativeGroupListCall<'a, C, A> { self._group_number = Some(new_value); self } + /// Select only creative groups that belong to these advertisers. + /// /// Append the given value to the *advertiser ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only creative groups that belong to these advertisers. pub fn add_advertiser_ids(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, A> { self._advertiser_ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeGroupListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -32762,8 +32555,8 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -32860,7 +32653,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut CreativeGroupPatchCall<'a, C, A> where C: BorrowMut CreativeGroupPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGroupPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative group ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative group ID. pub fn id(mut self, new_value: &str) -> CreativeGroupPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeGroupPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -33029,8 +32821,8 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/subaccounts".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -33231,42 +33023,41 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Subaccount) -> SubaccountPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SubaccountPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Subaccount ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Subaccount ID. pub fn id(mut self, new_value: &str) -> SubaccountPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SubaccountPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -33296,8 +33087,8 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -33392,7 +33183,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/subaccounts".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -33496,32 +33287,31 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Subaccount) -> SubaccountInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SubaccountInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SubaccountInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -33551,8 +33341,8 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -33674,7 +33464,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/subaccounts".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -33770,72 +33560,65 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SubaccountListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> SubaccountListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> SubaccountListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "subaccount*2015" will return objects with names like "subaccount June 2015", "subaccount April 2015", or simply "subaccount 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "subaccount" will match objects with name "my subaccount", "subaccount 2015", or simply "subaccount". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> SubaccountListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> SubaccountListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> SubaccountListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only subaccounts with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only subaccounts with these IDs. pub fn add_ids(mut self, new_value: &str) -> SubaccountListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SubaccountListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -33865,8 +33648,8 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -33961,7 +33744,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/subaccounts".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -34065,32 +33848,31 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Subaccount) -> SubaccountUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SubaccountUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SubaccountUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -34120,8 +33902,8 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -34211,7 +33993,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/subaccounts/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -34307,33 +34089,32 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SubaccountGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Subaccount ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Subaccount ID. pub fn id(mut self, new_value: &str) -> SubaccountGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SubaccountGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -34363,8 +34144,8 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -34452,7 +34233,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/mobileCarriers".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -34548,23 +34329,22 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> MobileCarrierListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MobileCarrierListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -34594,8 +34374,8 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -34690,7 +34470,7 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightConfigurationUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightConfigurationUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -34849,8 +34628,8 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightConfigurationPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Floodlight configuration ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Floodlight configuration ID. pub fn id(mut self, new_value: &str) -> FloodlightConfigurationPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightConfigurationPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -35116,8 +34894,8 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Floodlight configuration ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Floodlight configuration ID. pub fn id(mut self, new_value: &str) -> FloodlightConfigurationGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightConfigurationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -35359,8 +35136,8 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned. pub fn add_ids(mut self, new_value: &str) -> FloodlightConfigurationListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FloodlightConfigurationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -35608,8 +35383,8 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> OperatingSystemListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -35839,8 +35613,8 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// The DFA profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA profile ID. pub fn profile_id(mut self, new_value: &str) -> FileListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is 'DESCENDING'. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> FileListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// The field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> FileListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *scope* query property to the given value. - /// - /// /// The scope that defines which results are returned, default is 'MINE'. + /// + /// Sets the *scope* query property to the given value. pub fn scope(mut self, new_value: &str) -> FileListCall<'a, C, A> { self._scope = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of the nextToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> FileListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> FileListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -36135,8 +35903,8 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -36343,33 +36111,32 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// The ID of the report. + /// /// Sets the *report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> FileGetCall<'a, C, A> { self._report_id = new_value.to_string(); self } + /// The ID of the report file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the report file. pub fn file_id(mut self, new_value: &str) -> FileGetCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -36399,8 +36166,8 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -36595,7 +36362,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } + /// Select only placement groups that are associated with these sites. + /// /// Append the given value to the *site ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placement groups that are associated with these sites. pub fn add_site_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._site_ids.push(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for placement groups by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placement groups with names like "placement group June 2015", "placement group May 2015", or simply "placements 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placementgroup" will match placement groups with name "my placementgroup", "placementgroup 2015", or simply "placementgroup". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } + /// Select only placement groups with these pricing types. + /// /// Append the given value to the *pricing types* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placement groups with these pricing types. pub fn add_pricing_types(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._pricing_types.push(new_value.to_string()); self } + /// Select only placement groups that are associated with these placement strategies. + /// /// Append the given value to the *placement strategy ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placement groups that are associated with these placement strategies. pub fn add_placement_strategy_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._placement_strategy_ids.push(new_value.to_string()); self } - /// Sets the *placement group type* query property to the given value. - /// - /// /// Select only placement groups belonging with this group type. A package is a simple group of placements that acts as a single pricing point for a group of tags. A roadblock is a group of placements that not only acts as a single pricing point but also assumes that all the tags in it will be served at the same time. A roadblock requires one of its assigned placements to be marked as primary for reporting. + /// + /// Sets the *placement group type* query property to the given value. pub fn placement_group_type(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._placement_group_type = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> PlacementGroupListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only placement groups with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placement groups with these IDs. pub fn add_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } + /// Select only placement groups that are associated with these directory sites. + /// /// Append the given value to the *directory site ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placement groups that are associated with these directory sites. pub fn add_directory_site_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._directory_site_ids.push(new_value.to_string()); self } + /// Select only placement groups that are associated with these content categories. + /// /// Append the given value to the *content category ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placement groups that are associated with these content categories. pub fn add_content_category_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._content_category_ids.push(new_value.to_string()); self } + /// Select only placement groups that belong to these campaigns. + /// /// Append the given value to the *campaign ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placement groups that belong to these campaigns. pub fn add_campaign_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._campaign_ids.push(new_value.to_string()); self } - /// Sets the *archived* query property to the given value. - /// - /// /// Select only archived placements. Don't set this field to select both archived and non-archived placements. + /// + /// Sets the *archived* query property to the given value. pub fn archived(mut self, new_value: bool) -> PlacementGroupListCall<'a, C, A> { self._archived = Some(new_value); self } + /// Select only placement groups that belong to these advertisers. + /// /// Append the given value to the *advertiser ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placement groups that belong to these advertisers. pub fn add_advertiser_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, A> { self._advertiser_ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementGroupListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -36865,8 +36616,8 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGroupUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementGroupUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -37120,8 +36870,8 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGroupInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementGroupInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -37375,8 +37124,8 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/placementGroups/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -37562,33 +37311,32 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGroupGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Placement group ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Placement group ID. pub fn id(mut self, new_value: &str) -> PlacementGroupGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementGroupGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -37618,8 +37366,8 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -37716,7 +37464,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut PlacementGroupPatchCall<'a, C, A> where C: BorrowMut PlacementGroupPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGroupPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Placement group ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Placement group ID. pub fn id(mut self, new_value: &str) -> PlacementGroupPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementGroupPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -37885,8 +37632,8 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CreativeAssetInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeAssetInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Advertiser ID of this creative. This is a required field. + /// /// Sets the *advertiser id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Advertiser ID of this creative. This is a required field. pub fn advertiser_id(mut self, new_value: &str) -> CreativeAssetInsertCall<'a, C, A> { self._advertiser_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeAssetInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -38267,8 +38013,8 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// User role permission ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User role permission ID. pub fn id(mut self, new_value: &str) -> UserRolePermissionGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserRolePermissionGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -38510,8 +38255,8 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Select only user role permissions with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only user role permissions with these IDs. pub fn add_ids(mut self, new_value: &str) -> UserRolePermissionListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserRolePermissionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -38759,8 +38502,8 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountPermissionGroupListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -38990,8 +38732,8 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Account permission group ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account permission group ID. pub fn id(mut self, new_value: &str) -> AccountPermissionGroupGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountPermissionGroupGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -39233,8 +38974,8 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> ContentCategoryListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> ContentCategoryListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "contentcategory*2015" will return objects with names like "contentcategory June 2015", "contentcategory April 2015", or simply "contentcategory 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "contentcategory" will match objects with name "my contentcategory", "contentcategory 2015", or simply "contentcategory". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> ContentCategoryListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ContentCategoryListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ContentCategoryListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only content categories with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only content categories with these IDs. pub fn add_ids(mut self, new_value: &str) -> ContentCategoryListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ContentCategoryListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -39547,8 +39281,8 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ContentCategoryUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ContentCategoryUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -39802,8 +39535,8 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ContentCategoryInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ContentCategoryInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -40057,8 +39789,8 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Content category ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Content category ID. pub fn id(mut self, new_value: &str) -> ContentCategoryDeleteCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ContentCategoryDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -40289,8 +40020,8 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Content category ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Content category ID. pub fn id(mut self, new_value: &str) -> ContentCategoryGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ContentCategoryGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -40532,8 +40262,8 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ContentCategoryPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Content category ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Content category ID. pub fn id(mut self, new_value: &str) -> ContentCategoryPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ContentCategoryPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -40799,8 +40528,8 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeInsertCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/creatives".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -40999,32 +40728,31 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Creative) -> CreativeInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -41054,8 +40782,8 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -41150,7 +40878,7 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/creatives".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -41254,32 +40982,31 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Creative) -> CreativeUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -41309,8 +41036,8 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -41400,7 +41127,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/creatives/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -41496,33 +41223,32 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative ID. pub fn id(mut self, new_value: &str) -> CreativeGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -41552,8 +41278,8 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -41745,7 +41471,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/creatives".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -41841,157 +41567,140 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Select only creatives with these creative types. + /// /// Append the given value to the *types* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only creatives with these creative types. pub fn add_types(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._types.push(new_value.to_string()); self } - /// Sets the *studio creative id* query property to the given value. - /// - /// /// Select only creatives corresponding to this Studio creative ID. + /// + /// Sets the *studio creative id* query property to the given value. pub fn studio_creative_id(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._studio_creative_id = Some(new_value.to_string()); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } + /// Select only creatives with these size IDs. + /// /// Append the given value to the *size ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only creatives with these size IDs. pub fn add_size_ids(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._size_ids.push(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "creative*2015" will return objects with names like "creative June 2015", "creative April 2015", or simply "creative 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "creative" will match objects with name "my creative", "creative 2015", or simply "creative". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } + /// Select only creatives with these rendering IDs. + /// /// Append the given value to the *rendering ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only creatives with these rendering IDs. pub fn add_rendering_ids(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._rendering_ids.push(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> CreativeListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only creatives with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only creatives with these IDs. pub fn add_ids(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } + /// Select only creatives with these creative field IDs. + /// /// Append the given value to the *creative field ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only creatives with these creative field IDs. pub fn add_creative_field_ids(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._creative_field_ids.push(new_value.to_string()); self } + /// Select only in-stream video creatives with these companion IDs. + /// /// Append the given value to the *companion creative ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only in-stream video creatives with these companion IDs. pub fn add_companion_creative_ids(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._companion_creative_ids.push(new_value.to_string()); self } - /// Sets the *campaign id* query property to the given value. - /// - /// /// Select only creatives with this campaign ID. + /// + /// Sets the *campaign id* query property to the given value. pub fn campaign_id(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._campaign_id = Some(new_value.to_string()); self } - /// Sets the *archived* query property to the given value. - /// - /// /// Select only archived creatives. Leave blank to select archived and unarchived creatives. + /// + /// Sets the *archived* query property to the given value. pub fn archived(mut self, new_value: bool) -> CreativeListCall<'a, C, A> { self._archived = Some(new_value); self } - /// Sets the *advertiser id* query property to the given value. - /// - /// /// Select only creatives with this advertiser ID. + /// + /// Sets the *advertiser id* query property to the given value. pub fn advertiser_id(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { self._advertiser_id = Some(new_value.to_string()); self } - /// Sets the *active* query property to the given value. - /// - /// /// Select only active creatives. Leave blank to select active and inactive creatives. + /// + /// Sets the *active* query property to the given value. pub fn active(mut self, new_value: bool) -> CreativeListCall<'a, C, A> { self._active = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -42021,8 +41730,8 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -42119,7 +41828,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/creatives".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -42223,42 +41932,41 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Creative) -> CreativePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativePatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative ID. pub fn id(mut self, new_value: &str) -> CreativePatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -42288,8 +41996,8 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -42379,7 +42087,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -42475,33 +42183,32 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Campaign ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Campaign ID. pub fn id(mut self, new_value: &str) -> CampaignGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CampaignGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -42531,8 +42238,8 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -42631,7 +42338,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -42735,52 +42442,51 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Campaign) -> CampaignInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Default landing page name for this new campaign. Must be less than 256 characters long. + /// /// Sets the *default landing page name* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Default landing page name for this new campaign. Must be less than 256 characters long. pub fn default_landing_page_name(mut self, new_value: &str) -> CampaignInsertCall<'a, C, A> { self._default_landing_page_name = new_value.to_string(); self } + /// Default landing page URL for this new campaign. + /// /// Sets the *default landing page url* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Default landing page URL for this new campaign. pub fn default_landing_page_url(mut self, new_value: &str) -> CampaignInsertCall<'a, C, A> { self._default_landing_page_url = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CampaignInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -42810,8 +42516,8 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -42908,7 +42614,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -43012,42 +42718,41 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Campaign) -> CampaignPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Campaign ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Campaign ID. pub fn id(mut self, new_value: &str) -> CampaignPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CampaignPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -43077,8 +42782,8 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -43173,7 +42878,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -43277,32 +42982,31 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Campaign) -> CampaignUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CampaignUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -43332,8 +43036,8 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -43502,7 +43206,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/campaigns".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -43598,131 +43302,117 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *subaccount id* query property to the given value. - /// - /// /// Select only campaigns that belong to this subaccount. + /// + /// Sets the *subaccount id* query property to the given value. pub fn subaccount_id(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { self._subaccount_id = Some(new_value.to_string()); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for campaigns by name or ID. Wildcards (*) are allowed. For example, "campaign*2015" will return campaigns with names like "campaign June 2015", "campaign April 2015", or simply "campaign 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "campaign" will match campaigns with name "my campaign", "campaign 2015", or simply "campaign". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *overridden event tag id* query property to the given value. - /// - /// /// Select only campaigns that have overridden this event tag ID. + /// + /// Sets the *overridden event tag id* query property to the given value. pub fn overridden_event_tag_id(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { self._overridden_event_tag_id = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> CampaignListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only campaigns with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only campaigns with these IDs. pub fn add_ids(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } + /// Exclude campaigns with these IDs. + /// /// Append the given value to the *excluded ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Exclude campaigns with these IDs. pub fn add_excluded_ids(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { self._excluded_ids.push(new_value.to_string()); self } - /// Sets the *at least one optimization activity* query property to the given value. - /// - /// /// Select only campaigns that have at least one optimization activity. + /// + /// Sets the *at least one optimization activity* query property to the given value. pub fn at_least_one_optimization_activity(mut self, new_value: bool) -> CampaignListCall<'a, C, A> { self._at_least_one_optimization_activity = Some(new_value); self } - /// Sets the *archived* query property to the given value. - /// - /// /// Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns. + /// + /// Sets the *archived* query property to the given value. pub fn archived(mut self, new_value: bool) -> CampaignListCall<'a, C, A> { self._archived = Some(new_value); self } + /// Select only campaigns that belong to these advertisers. + /// /// Append the given value to the *advertiser ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only campaigns that belong to these advertisers. pub fn add_advertiser_ids(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { self._advertiser_ids.push(new_value.to_string()); self } + /// Select only campaigns whose advertisers belong to these advertiser groups. + /// /// Append the given value to the *advertiser group ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only campaigns whose advertisers belong to these advertiser groups. pub fn add_advertiser_group_ids(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { self._advertiser_group_ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CampaignListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -43752,8 +43442,8 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -43842,7 +43532,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/eventTags/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -43928,33 +43618,32 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Event tag ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Event tag ID. pub fn id(mut self, new_value: &str) -> EventTagDeleteCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventTagDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -43984,8 +43673,8 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -44131,7 +43820,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/eventTags".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -44227,105 +43916,94 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "eventtag*2015" will return objects with names like "eventtag June 2015", "eventtag April 2015", or simply "eventtag 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "eventtag" will match objects with name "my eventtag", "eventtag 2015", or simply "eventtag". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } + /// Select only event tags with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only event tags with these IDs. pub fn add_ids(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } + /// Select only event tags with the specified event tag types. Event tag types can be used to specify whether to use a third-party pixel, a third-party JavaScript URL, or a third-party click-through URL for either impression or click tracking. + /// /// Append the given value to the *event tag types* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only event tags with the specified event tag types. Event tag types can be used to specify whether to use a third-party pixel, a third-party JavaScript URL, or a third-party click-through URL for either impression or click tracking. pub fn add_event_tag_types(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { self._event_tag_types.push(new_value.to_string()); self } - /// Sets the *enabled* query property to the given value. - /// - /// /// Select only enabled event tags. When definitionsOnly is set to true, only the specified advertiser or campaign's event tags' enabledByDefault field is examined. When definitionsOnly is set to false, the specified ad or specified campaign's parent advertiser's or parent campaign's event tags' enabledByDefault and status fields are examined as well. + /// + /// Sets the *enabled* query property to the given value. pub fn enabled(mut self, new_value: bool) -> EventTagListCall<'a, C, A> { self._enabled = Some(new_value); self } - /// Sets the *definitions only* query property to the given value. - /// - /// /// Examine only the specified ad or campaign or advertiser's event tags for matching selector criteria. When set to false, the parent advertiser and parent campaign is examined as well. In addition, when set to false, the status field is examined as well along with the enabledByDefault field. + /// + /// Sets the *definitions only* query property to the given value. pub fn definitions_only(mut self, new_value: bool) -> EventTagListCall<'a, C, A> { self._definitions_only = Some(new_value); self } - /// Sets the *campaign id* query property to the given value. - /// - /// /// Select only event tags that belong to this campaign. + /// + /// Sets the *campaign id* query property to the given value. pub fn campaign_id(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { self._campaign_id = Some(new_value.to_string()); self } - /// Sets the *advertiser id* query property to the given value. - /// - /// /// Select only event tags that belong to this advertiser. + /// + /// Sets the *advertiser id* query property to the given value. pub fn advertiser_id(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { self._advertiser_id = Some(new_value.to_string()); self } - /// Sets the *ad id* query property to the given value. - /// - /// /// Select only event tags that belong to this ad. + /// + /// Sets the *ad id* query property to the given value. pub fn ad_id(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { self._ad_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventTagListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -44355,8 +44033,8 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -44451,7 +44129,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/eventTags".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -44555,32 +44233,31 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &EventTag) -> EventTagInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventTagInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -44610,8 +44287,8 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -44708,7 +44385,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/eventTags".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -44812,42 +44489,41 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &EventTag) -> EventTagPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Event tag ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Event tag ID. pub fn id(mut self, new_value: &str) -> EventTagPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventTagPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -44877,8 +44553,8 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -44973,7 +44649,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/eventTags".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -45077,32 +44753,31 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &EventTag) -> EventTagUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventTagUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -45132,8 +44807,8 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -45223,7 +44898,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/eventTags/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -45319,33 +44994,32 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Event tag ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Event tag ID. pub fn id(mut self, new_value: &str) -> EventTagGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventTagGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -45375,8 +45049,8 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -45496,7 +45170,7 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/cities".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -45592,58 +45266,53 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CityListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Select only cities from these regions. + /// /// Append the given value to the *region dart ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only cities from these regions. pub fn add_region_dart_ids(mut self, new_value: &str) -> CityListCall<'a, C, A> { self._region_dart_ids.push(new_value.to_string()); self } - /// Sets the *name prefix* query property to the given value. - /// - /// /// Select only cities with names starting with this prefix. + /// + /// Sets the *name prefix* query property to the given value. pub fn name_prefix(mut self, new_value: &str) -> CityListCall<'a, C, A> { self._name_prefix = Some(new_value.to_string()); self } + /// Select only cities with these DART IDs. + /// /// Append the given value to the *dart ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only cities with these DART IDs. pub fn add_dart_ids(mut self, new_value: &str) -> CityListCall<'a, C, A> { self._dart_ids.push(new_value.to_string()); self } + /// Select only cities from these countries. + /// /// Append the given value to the *country dart ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only cities from these countries. pub fn add_country_dart_ids(mut self, new_value: &str) -> CityListCall<'a, C, A> { self._country_dart_ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CityListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -45673,8 +45342,8 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -45796,7 +45465,7 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> PlacementStrategyListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> PlacementStrategyListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "placementstrategy*2015" will return objects with names like "placementstrategy June 2015", "placementstrategy April 2015", or simply "placementstrategy 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placementstrategy" will match objects with name "my placementstrategy", "placementstrategy 2015", or simply "placementstrategy". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> PlacementStrategyListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> PlacementStrategyListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> PlacementStrategyListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only placement strategies with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placement strategies with these IDs. pub fn add_ids(mut self, new_value: &str) -> PlacementStrategyListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementStrategyListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -45987,8 +45649,8 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementStrategyUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementStrategyUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -46242,8 +45903,8 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Placement strategy ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Placement strategy ID. pub fn id(mut self, new_value: &str) -> PlacementStrategyGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementStrategyGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -46485,8 +46145,8 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Placement strategy ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Placement strategy ID. pub fn id(mut self, new_value: &str) -> PlacementStrategyDeleteCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementStrategyDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -46717,8 +46376,8 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementStrategyInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementStrategyInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -46972,8 +46630,8 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementStrategyPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Placement strategy ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Placement strategy ID. pub fn id(mut self, new_value: &str) -> PlacementStrategyPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementStrategyPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -47239,8 +46896,8 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/directorySites".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -47493,128 +47150,114 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name, ID or URL. Wildcards (*) are allowed. For example, "directory site*2015" will return objects with names like "directory site June 2015", "directory site April 2015", or simply "directory site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "directory site" will match objects with name "my directory site", "directory site 2015" or simply, "directory site". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *parent id* query property to the given value. - /// - /// /// Select only directory sites with this parent ID. + /// + /// Sets the *parent id* query property to the given value. pub fn parent_id(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { self._parent_id = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> DirectorySiteListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only directory sites with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only directory sites with these IDs. pub fn add_ids(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *dfp_network_code* query property to the given value. - /// - /// /// Select only directory sites with this DFP network code. + /// + /// Sets the *dfp_network_code* query property to the given value. pub fn dfp_network_code(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { self._dfp_network_code = Some(new_value.to_string()); self } - /// Sets the *country id* query property to the given value. - /// - /// /// Select only directory sites with this country ID. + /// + /// Sets the *country id* query property to the given value. pub fn country_id(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { self._country_id = Some(new_value.to_string()); self } - /// Sets the *active* query property to the given value. - /// - /// /// Select only active directory sites. Leave blank to retrieve both active and inactive directory sites. + /// + /// Sets the *active* query property to the given value. pub fn active(mut self, new_value: bool) -> DirectorySiteListCall<'a, C, A> { self._active = Some(new_value); self } - /// Sets the *accepts publisher paid placements* query property to the given value. - /// - /// /// Select only directory sites that accept publisher paid placements. This field can be left blank. + /// + /// Sets the *accepts publisher paid placements* query property to the given value. pub fn accepts_publisher_paid_placements(mut self, new_value: bool) -> DirectorySiteListCall<'a, C, A> { self._accepts_publisher_paid_placements = Some(new_value); self } - /// Sets the *accepts interstitial placements* query property to the given value. - /// - /// /// This search filter is no longer supported and will have no effect on the results returned. + /// + /// Sets the *accepts interstitial placements* query property to the given value. pub fn accepts_interstitial_placements(mut self, new_value: bool) -> DirectorySiteListCall<'a, C, A> { self._accepts_interstitial_placements = Some(new_value); self } - /// Sets the *accepts in stream video placements* query property to the given value. - /// - /// /// This search filter is no longer supported and will have no effect on the results returned. + /// + /// Sets the *accepts in stream video placements* query property to the given value. pub fn accepts_in_stream_video_placements(mut self, new_value: bool) -> DirectorySiteListCall<'a, C, A> { self._accepts_in_stream_video_placements = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DirectorySiteListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -47644,8 +47287,8 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -47735,7 +47378,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/directorySites/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -47831,33 +47474,32 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> DirectorySiteGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Directory site ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Directory site ID. pub fn id(mut self, new_value: &str) -> DirectorySiteGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DirectorySiteGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -47887,8 +47529,8 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -47983,7 +47625,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/sizes".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -48087,32 +47729,31 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Size) -> SizeInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SizeInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SizeInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -48142,8 +47783,8 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -48255,7 +47896,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/sizes".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -48351,56 +47992,51 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SizeListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *width* query property to the given value. - /// - /// /// Select only sizes with this width. + /// + /// Sets the *width* query property to the given value. pub fn width(mut self, new_value: i32) -> SizeListCall<'a, C, A> { self._width = Some(new_value); self } + /// Select only sizes with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only sizes with these IDs. pub fn add_ids(mut self, new_value: &str) -> SizeListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *iab standard* query property to the given value. - /// - /// /// Select only IAB standard sizes. + /// + /// Sets the *iab standard* query property to the given value. pub fn iab_standard(mut self, new_value: bool) -> SizeListCall<'a, C, A> { self._iab_standard = Some(new_value); self } - /// Sets the *height* query property to the given value. - /// - /// /// Select only sizes with this height. + /// + /// Sets the *height* query property to the given value. pub fn height(mut self, new_value: i32) -> SizeListCall<'a, C, A> { self._height = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SizeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -48430,8 +48066,8 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -48521,7 +48157,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/sizes/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -48617,33 +48253,32 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SizeGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Size ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Size ID. pub fn id(mut self, new_value: &str) -> SizeGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SizeGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -48673,8 +48308,8 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -48764,7 +48399,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountActiveAdSummaryGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Account ID. + /// /// Sets the *summary account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Account ID. pub fn summary_account_id(mut self, new_value: &str) -> AccountActiveAdSummaryGetCall<'a, C, A> { self._summary_account_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountActiveAdSummaryGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -48916,8 +48550,8 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountUserProfileUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountUserProfileUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -49171,8 +48804,8 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *user role id* query property to the given value. - /// - /// /// Select only user profiles with the specified user role ID. + /// + /// Sets the *user role id* query property to the given value. pub fn user_role_id(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, A> { self._user_role_id = Some(new_value.to_string()); self } - /// Sets the *subaccount id* query property to the given value. - /// - /// /// Select only user profiles with the specified subaccount ID. + /// + /// Sets the *subaccount id* query property to the given value. pub fn subaccount_id(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, A> { self._subaccount_id = Some(new_value.to_string()); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, "user profile*2015" will return objects with names like "user profile June 2015", "user profile April 2015", or simply "user profile 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "user profile" will match objects with name "my user profile", "user profile 2015", or simply "user profile". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AccountUserProfileListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only user profiles with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only user profiles with these IDs. pub fn add_ids(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *active* query property to the given value. - /// - /// /// Select only active user profiles. + /// + /// Sets the *active* query property to the given value. pub fn active(mut self, new_value: bool) -> AccountUserProfileListCall<'a, C, A> { self._active = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountUserProfileListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -49524,8 +49147,8 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountUserProfilePatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// User profile ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID. pub fn id(mut self, new_value: &str) -> AccountUserProfilePatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountUserProfilePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -49791,8 +49413,8 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// User profile ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID. pub fn id(mut self, new_value: &str) -> AccountUserProfileGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AccountUserProfileGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -50034,8 +49655,8 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/countries".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -50219,23 +49840,22 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CountryListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CountryListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -50265,8 +49885,8 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -50356,7 +49976,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/countries/{dartId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{dartId}", "dartId")].iter() { @@ -50452,33 +50072,32 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CountryGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Country DART ID. + /// /// Sets the *dart id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Country DART ID. pub fn dart_id(mut self, new_value: &str) -> CountryGetCall<'a, C, A> { self._dart_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CountryGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -50508,8 +50127,8 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -50608,7 +50227,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValuePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldValuePatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative field ID for this creative field value. + /// /// Sets the *creative field id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValuePatchCall<'a, C, A> { self._creative_field_id = new_value.to_string(); self } + /// Creative Field Value ID + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative Field Value ID pub fn id(mut self, new_value: &str) -> CreativeFieldValuePatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldValuePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -50787,8 +50405,8 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative field ID for this creative field value. + /// /// Sets the *creative field id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValueDeleteCall<'a, C, A> { self._creative_field_id = new_value.to_string(); self } + /// Creative Field Value ID + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative Field Value ID pub fn id(mut self, new_value: &str) -> CreativeFieldValueDeleteCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldValueDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -51031,8 +50648,8 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldValueInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative field ID for this creative field value. + /// /// Sets the *creative field id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValueInsertCall<'a, C, A> { self._creative_field_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldValueInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -51298,8 +50914,8 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldValueUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative field ID for this creative field value. + /// /// Sets the *creative field id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValueUpdateCall<'a, C, A> { self._creative_field_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldValueUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -51565,8 +51180,8 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative field ID for this creative field value. + /// /// Sets the *creative field id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValueGetCall<'a, C, A> { self._creative_field_id = new_value.to_string(); self } + /// Creative Field Value ID + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative Field Value ID pub fn id(mut self, new_value: &str) -> CreativeFieldValueGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldValueGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -51820,8 +51434,8 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Creative field ID for this creative field value. + /// /// Sets the *creative field id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, A> { self._creative_field_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed. + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> CreativeFieldValueListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only creative field values with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only creative field values with these IDs. pub fn add_ids(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CreativeFieldValueListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -52146,8 +51753,8 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut ReportUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Report) -> ReportUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The DFA user profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// The ID of the report. + /// /// Sets the *report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportUpdateCall<'a, C, A> { self._report_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -52413,8 +52019,8 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -52605,41 +52211,39 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau } + /// The DFA profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportRunCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// The ID of the report. + /// /// Sets the *report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportRunCall<'a, C, A> { self._report_id = new_value.to_string(); self } - /// Sets the *synchronous* query property to the given value. - /// - /// /// If set and true, tries to run the report synchronously. + /// + /// Sets the *synchronous* query property to the given value. pub fn synchronous(mut self, new_value: bool) -> ReportRunCall<'a, C, A> { self._synchronous = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportRunCall<'a, C, A> { self._delegate = Some(new_value); self @@ -52669,8 +52273,8 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -52871,42 +52475,41 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Report) -> ReportPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The DFA user profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// The ID of the report. + /// /// Sets the *report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportPatchCall<'a, C, A> { self._report_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -52936,8 +52539,8 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -53143,65 +52746,60 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A } + /// The DFA profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportFileListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// The ID of the parent report. + /// /// Sets the *report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the parent report. pub fn report_id(mut self, new_value: &str) -> ReportFileListCall<'a, C, A> { self._report_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is 'DESCENDING'. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> ReportFileListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// The field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> ReportFileListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of the nextToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ReportFileListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ReportFileListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportFileListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -53231,8 +52829,8 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -53431,32 +53029,31 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Report) -> ReportInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The DFA user profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -53486,8 +53083,8 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -53686,32 +53283,31 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportCompatibleFieldQueryCall<'a, C, A> { self._request = new_value.clone(); self } + /// The DFA user profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportCompatibleFieldQueryCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportCompatibleFieldQueryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -53741,8 +53337,8 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// The DFA user profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// The ID of the report. + /// /// Sets the *report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._report_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -53984,8 +53579,8 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -54194,43 +53789,42 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: } + /// The DFA profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportFileGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// The ID of the report. + /// /// Sets the *report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportFileGetCall<'a, C, A> { self._report_id = new_value.to_string(); self } + /// The ID of the report file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the report file. pub fn file_id(mut self, new_value: &str) -> ReportFileGetCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportFileGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -54260,8 +53854,8 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -54436,33 +54030,32 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// The DFA user profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportDeleteCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// The ID of the report. + /// /// Sets the *report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportDeleteCall<'a, C, A> { self._report_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -54492,8 +54085,8 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -54702,63 +54295,57 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa } + /// The DFA user profile ID. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is 'DESCENDING'. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> ReportListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// The field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> ReportListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } - /// Sets the *scope* query property to the given value. - /// - /// /// The scope that defines which results are returned, default is 'MINE'. + /// + /// Sets the *scope* query property to the given value. pub fn scope(mut self, new_value: &str) -> ReportListCall<'a, C, A> { self._scope = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of the nextToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ReportListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ReportListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -54788,8 +54375,8 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -54877,7 +54464,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/browsers".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -54973,23 +54560,22 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> BrowserListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> BrowserListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -55019,8 +54605,8 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -55117,7 +54703,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/placements".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -55221,42 +54807,41 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Placement) -> PlacementPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementPatchCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Placement ID. + /// /// Sets the *id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Placement ID. pub fn id(mut self, new_value: &str) -> PlacementPatchCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -55286,8 +54871,8 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -55509,7 +55094,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/placements".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -55605,178 +55190,159 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Order of sorted results, default is ASCENDING. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort field* query property to the given value. - /// - /// /// Field by which to sort the list. + /// + /// Sets the *sort field* query property to the given value. pub fn sort_field(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._sort_field = Some(new_value.to_string()); self } + /// Select only placements that are associated with these sizes. + /// /// Append the given value to the *size ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placements that are associated with these sizes. pub fn add_size_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._size_ids.push(new_value.to_string()); self } + /// Select only placements that are associated with these sites. + /// /// Append the given value to the *site ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placements that are associated with these sites. pub fn add_site_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._site_ids.push(new_value.to_string()); self } - /// Sets the *search string* query property to the given value. - /// - /// /// Allows searching for placements by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placements with names like "placement June 2015", "placement May 2015", or simply "placements 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placement" will match placements with name "my placement", "placement 2015", or simply "placement". + /// + /// Sets the *search string* query property to the given value. pub fn search_string(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._search_string = Some(new_value.to_string()); self } + /// Select only placements with these pricing types. + /// /// Append the given value to the *pricing types* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placements with these pricing types. pub fn add_pricing_types(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._pricing_types.push(new_value.to_string()); self } + /// Select only placements that are associated with these placement strategies. + /// /// Append the given value to the *placement strategy ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placements that are associated with these placement strategies. pub fn add_placement_strategy_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._placement_strategy_ids.push(new_value.to_string()); self } - /// Sets the *payment source* query property to the given value. - /// - /// /// Select only placements with this payment source. + /// + /// Sets the *payment source* query property to the given value. pub fn payment_source(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._payment_source = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Value of the nextPageToken from the previous result page. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> PlacementListCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Select only placements with these IDs. + /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placements with these IDs. pub fn add_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._ids.push(new_value.to_string()); self } + /// Select only placements that belong to these placement groups. + /// /// Append the given value to the *group ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placements that belong to these placement groups. pub fn add_group_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._group_ids.push(new_value.to_string()); self } + /// Select only placements that are associated with these directory sites. + /// /// Append the given value to the *directory site ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placements that are associated with these directory sites. pub fn add_directory_site_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._directory_site_ids.push(new_value.to_string()); self } + /// Select only placements that are associated with these content categories. + /// /// Append the given value to the *content category ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placements that are associated with these content categories. pub fn add_content_category_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._content_category_ids.push(new_value.to_string()); self } + /// Select only placements that are associated with these compatibilities. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. + /// /// Append the given value to the *compatibilities* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placements that are associated with these compatibilities. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. pub fn add_compatibilities(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._compatibilities.push(new_value.to_string()); self } + /// Select only placements that belong to these campaigns. + /// /// Append the given value to the *campaign ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placements that belong to these campaigns. pub fn add_campaign_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._campaign_ids.push(new_value.to_string()); self } - /// Sets the *archived* query property to the given value. - /// - /// /// Select only archived placements. Don't set this field to select both archived and non-archived placements. + /// + /// Sets the *archived* query property to the given value. pub fn archived(mut self, new_value: bool) -> PlacementListCall<'a, C, A> { self._archived = Some(new_value); self } + /// Select only placements that belong to these advertisers. + /// /// Append the given value to the *advertiser ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Select only placements that belong to these advertisers. pub fn add_advertiser_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { self._advertiser_ids.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -55806,8 +55372,8 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -55897,7 +55463,7 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/placements/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId"), ("{id}", "id")].iter() { @@ -55993,33 +55559,32 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGetCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Placement ID. + /// /// Sets the *id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Placement ID. pub fn id(mut self, new_value: &str) -> PlacementGetCall<'a, C, A> { self._id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -56049,8 +55614,8 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -56145,7 +55710,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/placements".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -56249,32 +55814,31 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Placement) -> PlacementInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementInsertCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -56304,8 +55868,8 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -56400,7 +55964,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/dfareporting/v2.0/userprofiles/{profileId}/placements".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{profileId}", "profileId")].iter() { @@ -56504,32 +56068,31 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Placement) -> PlacementUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// User profile ID associated with this request. + /// /// Sets the *profile id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementUpdateCall<'a, C, A> { self._profile_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -56559,8 +56122,8 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Dfatrafficking`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -56671,7 +56234,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGeneratetagCall<'a, C, A> { self._profile_id = new_value.to_string(); self } + /// Tag formats to generate for these placements. + /// /// Append the given value to the *tag formats* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Tag formats to generate for these placements. pub fn add_tag_formats(mut self, new_value: &str) -> PlacementGeneratetagCall<'a, C, A> { self._tag_formats.push(new_value.to_string()); self } + /// Generate tags for these placements. + /// /// Append the given value to the *placement ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Generate tags for these placements. pub fn add_placement_ids(mut self, new_value: &str) -> PlacementGeneratetagCall<'a, C, A> { self._placement_ids.push(new_value.to_string()); self } - /// Sets the *campaign id* query property to the given value. - /// - /// /// Generate placements belonging to this campaign. This is a required field. + /// + /// Sets the *campaign id* query property to the given value. pub fn campaign_id(mut self, new_value: &str) -> PlacementGeneratetagCall<'a, C, A> { self._campaign_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlacementGeneratetagCall<'a, C, A> { self._delegate = Some(new_value); self @@ -56839,8 +56398,8 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/discovery1/src/cmn.rs b/gen/discovery1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/discovery1/src/cmn.rs +++ b/gen/discovery1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/discovery1/src/lib.rs b/gen/discovery1/src/lib.rs index 3bc0fb8c39..3966af3f3e 100644 --- a/gen/discovery1/src/lib.rs +++ b/gen/discovery1/src/lib.rs @@ -98,16 +98,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -243,16 +245,18 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -298,7 +302,7 @@ impl<'a, C, A> Discovery /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestDescriptionAuthOauth2 { /// Available OAuth 2.0 scopes. pub scopes: HashMap, @@ -312,7 +316,7 @@ impl Part for RestDescriptionAuthOauth2 {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestMethodResponse { /// Schema ID for the response schema. #[serde(rename="$ref")] @@ -327,7 +331,7 @@ impl Part for RestMethodResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JsonSchemaVariant { /// The map of discriminant value to schema to use for parsing.. pub map: Vec, @@ -343,7 +347,7 @@ impl Part for JsonSchemaVariant {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestMethodMediaUploadProtocols { /// Supports uploading as a single HTTP request. pub simple: RestMethodMediaUploadProtocolsSimple, @@ -359,7 +363,7 @@ impl Part for RestMethodMediaUploadProtocols {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestMethodMediaUploadProtocolsResumable { /// The URI path to be used for upload. Should be used in conjunction with the basePath property at the api-level. pub path: String, @@ -375,7 +379,7 @@ impl Part for RestMethodMediaUploadProtocolsResumable {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JsonSchemaAnnotations { /// A list of methods for which this property is required on requests. pub required: Vec, @@ -389,7 +393,7 @@ impl Part for JsonSchemaAnnotations {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JsonSchemaVariantMap { /// no description provided pub type_value: String, @@ -406,7 +410,7 @@ impl Part for JsonSchemaVariantMap {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestDescriptionIcons { /// The URL of the 32x32 icon. pub x32: String, @@ -422,7 +426,7 @@ impl Part for RestDescriptionIcons {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestMethod { /// OAuth 2.0 scopes applicable to this method. pub scopes: Vec, @@ -476,7 +480,7 @@ impl Part for RestMethod {} /// /// * [get rest apis](struct.ApiGetRestCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestDescription { /// The protocol described by this document. pub protocol: String, @@ -554,7 +558,7 @@ impl ResponseResult for RestDescription {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestMethodMediaUpload { /// Maximum size of a media upload, such as "1MB", "2GB" or "3TB". #[serde(rename="maxSize")] @@ -578,7 +582,7 @@ impl Part for RestMethodMediaUpload {} /// /// * [list apis](struct.ApiListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DirectoryList { /// The individual directory entries. One entry per api/version pair. pub items: Vec, @@ -596,7 +600,7 @@ impl ResponseResult for DirectoryList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JsonSchema { /// A description of this object. pub description: String, @@ -653,7 +657,7 @@ impl Part for JsonSchema {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DirectoryListItems { /// The kind for this response. pub kind: String, @@ -692,7 +696,7 @@ impl Part for DirectoryListItems {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestDescriptionAuth { /// OAuth 2.0 authentication information. pub oauth2: RestDescriptionAuthOauth2, @@ -706,7 +710,7 @@ impl Part for RestDescriptionAuth {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestDescriptionAuthOauth2Scopes { /// Description of scope. pub description: String, @@ -720,7 +724,7 @@ impl Part for RestDescriptionAuthOauth2Scopes {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DirectoryListItemsIcons { /// The URL of the 32x32 icon. pub x32: String, @@ -736,7 +740,7 @@ impl Part for DirectoryListItemsIcons {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestMethodRequest { /// parameter name. #[serde(rename="parameterName")] @@ -754,7 +758,7 @@ impl Part for RestMethodRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestResource { /// Methods on this resource. pub methods: HashMap, @@ -769,7 +773,7 @@ impl Part for RestResource {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RestMethodMediaUploadProtocolsSimple { /// The URI path to be used for upload. Should be used in conjunction with the basePath property at the api-level. pub path: String, @@ -1031,33 +1035,32 @@ impl<'a, C, A> ApiGetRestCall<'a, C, A> where C: BorrowMut, A: oa } + /// The name of the API. + /// /// Sets the *api* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name of the API. pub fn api(mut self, new_value: &str) -> ApiGetRestCall<'a, C, A> { self._api = new_value.to_string(); self } + /// The version of the API. + /// /// Sets the *version* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The version of the API. pub fn version(mut self, new_value: &str) -> ApiGetRestCall<'a, C, A> { self._version = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ApiGetRestCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1237,29 +1240,26 @@ impl<'a, C, A> ApiListCall<'a, C, A> where C: BorrowMut, A: oauth } - /// Sets the *preferred* query property to the given value. - /// - /// /// Return only the preferred version of an API. + /// + /// Sets the *preferred* query property to the given value. pub fn preferred(mut self, new_value: bool) -> ApiListCall<'a, C, A> { self._preferred = Some(new_value); self } - /// Sets the *name* query property to the given value. - /// - /// /// Only include APIs with the given name. + /// + /// Sets the *name* query property to the given value. pub fn name(mut self, new_value: &str) -> ApiListCall<'a, C, A> { self._name = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ApiListCall<'a, C, A> { self._delegate = Some(new_value); self diff --git a/gen/dns1_beta1/README.md b/gen/dns1_beta1/README.md index 6c27b44d42..b635556bd3 100644 --- a/gen/dns1_beta1/README.md +++ b/gen/dns1_beta1/README.md @@ -108,16 +108,18 @@ let result = hub.managed_zones().list("project") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/dns1_beta1/src/cmn.rs b/gen/dns1_beta1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/dns1_beta1/src/cmn.rs +++ b/gen/dns1_beta1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/dns1_beta1/src/lib.rs b/gen/dns1_beta1/src/lib.rs index 22097bb535..777775cd0c 100644 --- a/gen/dns1_beta1/src/lib.rs +++ b/gen/dns1_beta1/src/lib.rs @@ -109,16 +109,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -286,16 +288,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -418,7 +422,7 @@ impl Resource for ResourceRecordSet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Quota { /// Maximum allowed number of ResourceRecordSets per zone in the project. #[serde(rename="rrsetsPerManagedZone")] @@ -454,7 +458,7 @@ impl Part for Quota {} /// /// * [get projects](struct.ProjectGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Project { /// Quotas assigned to this project (output only). pub quota: Quota, @@ -479,7 +483,7 @@ impl ResponseResult for Project {} /// /// * [list changes](struct.ChangeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChangesListResponse { /// The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. /// @@ -504,7 +508,7 @@ impl ResponseResult for ChangesListResponse {} /// /// * [list managed zones](struct.ManagedZoneListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ManagedZonesListResponse { /// The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. /// @@ -563,7 +567,7 @@ impl ResponseResult for Change {} /// /// * [list resource record sets](struct.ResourceRecordSetListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ResourceRecordSetsListResponse { /// The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. /// @@ -1120,42 +1124,41 @@ impl<'a, C, A> ChangeCreateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Change) -> ChangeCreateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Identifies the project addressed by this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ChangeCreateCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// /// Sets the *managed zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ChangeCreateCall<'a, C, A> { self._managed_zone = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChangeCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1185,8 +1188,8 @@ impl<'a, C, A> ChangeCreateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1392,65 +1395,60 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa } + /// Identifies the project addressed by this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// /// Sets the *managed zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { self._managed_zone = new_value.to_string(); self } - /// Sets the *sort order* query property to the given value. - /// - /// /// Sorting order direction: 'ascending' or 'descending'. + /// + /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Sets the *sort by* query property to the given value. - /// - /// /// Sorting criterion. The only supported value is change sequence. + /// + /// Sets the *sort by* query property to the given value. pub fn sort_by(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { self._sort_by = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ChangeListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChangeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1480,8 +1478,8 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevClouddnReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1669,43 +1667,42 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// Identifies the project addressed by this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ChangeGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// /// Sets the *managed zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ChangeGetCall<'a, C, A> { self._managed_zone = new_value.to_string(); self } + /// The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse. + /// /// Sets the *change id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse. pub fn change_id(mut self, new_value: &str) -> ChangeGetCall<'a, C, A> { self._change_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChangeGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1735,8 +1732,8 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevClouddnReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1935,32 +1932,31 @@ impl<'a, C, A> ManagedZoneCreateCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &ManagedZone) -> ManagedZoneCreateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Identifies the project addressed by this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ManagedZoneCreateCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagedZoneCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1990,8 +1986,8 @@ impl<'a, C, A> ManagedZoneCreateCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2166,33 +2162,32 @@ impl<'a, C, A> ManagedZoneDeleteCall<'a, C, A> where C: BorrowMut } + /// Identifies the project addressed by this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ManagedZoneDeleteCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// /// Sets the *managed zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ManagedZoneDeleteCall<'a, C, A> { self._managed_zone = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagedZoneDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2222,8 +2217,8 @@ impl<'a, C, A> ManagedZoneDeleteCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2409,33 +2404,32 @@ impl<'a, C, A> ManagedZoneGetCall<'a, C, A> where C: BorrowMut, A } + /// Identifies the project addressed by this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ManagedZoneGetCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// /// Sets the *managed zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ManagedZoneGetCall<'a, C, A> { self._managed_zone = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagedZoneGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2465,8 +2459,8 @@ impl<'a, C, A> ManagedZoneGetCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevClouddnReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2660,39 +2654,36 @@ impl<'a, C, A> ManagedZoneListCall<'a, C, A> where C: BorrowMut, } + /// Identifies the project addressed by this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ManagedZoneListCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ManagedZoneListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ManagedZoneListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ManagedZoneListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2722,8 +2713,8 @@ impl<'a, C, A> ManagedZoneListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevClouddnReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2929,65 +2920,60 @@ impl<'a, C, A> ResourceRecordSetListCall<'a, C, A> where C: BorrowMut ResourceRecordSetListCall<'a, C, A> { self._project = new_value.to_string(); self } + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// /// Sets the *managed zone* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ResourceRecordSetListCall<'a, C, A> { self._managed_zone = new_value.to_string(); self } - /// Sets the *type* query property to the given value. - /// - /// /// Restricts the list to return only records of this type. If present, the "name" parameter must also be present. + /// + /// Sets the *type* query property to the given value. pub fn type_(mut self, new_value: &str) -> ResourceRecordSetListCall<'a, C, A> { self._type_ = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ResourceRecordSetListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *name* query property to the given value. - /// - /// /// Restricts the list to return only records with this fully qualified domain name. + /// + /// Sets the *name* query property to the given value. pub fn name(mut self, new_value: &str) -> ResourceRecordSetListCall<'a, C, A> { self._name = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ResourceRecordSetListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ResourceRecordSetListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3017,8 +3003,8 @@ impl<'a, C, A> ResourceRecordSetListCall<'a, C, A> where C: BorrowMut ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// Identifies the project addressed by this request. + /// /// Sets the *project* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ProjectGetCall<'a, C, A> { self._project = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ProjectGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3248,8 +3233,8 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::NdevClouddnReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/doubleclickbidmanager1/README.md b/gen/doubleclickbidmanager1/README.md index df2354706e..142374c500 100644 --- a/gen/doubleclickbidmanager1/README.md +++ b/gen/doubleclickbidmanager1/README.md @@ -102,16 +102,18 @@ let result = hub.queries().getquery("queryId") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/doubleclickbidmanager1/src/cmn.rs b/gen/doubleclickbidmanager1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/doubleclickbidmanager1/src/cmn.rs +++ b/gen/doubleclickbidmanager1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/doubleclickbidmanager1/src/lib.rs b/gen/doubleclickbidmanager1/src/lib.rs index 61a7e18abe..055cd178bd 100644 --- a/gen/doubleclickbidmanager1/src/lib.rs +++ b/gen/doubleclickbidmanager1/src/lib.rs @@ -103,16 +103,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -248,16 +250,18 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -333,7 +337,7 @@ impl RequestValue for DownloadLineItemsRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportFailure { /// Error code that shows why the report was not created. #[serde(rename="errorCode")] @@ -371,7 +375,7 @@ impl Part for Parameters {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportKey { /// Query ID. #[serde(rename="queryId")] @@ -417,7 +421,7 @@ impl RequestValue for UploadLineItemsRequest {} /// /// * [listqueries queries](struct.QueryListqueryCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListQueriesResponse { /// Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#listQueriesResponse". pub kind: String, @@ -432,7 +436,7 @@ impl ResponseResult for ListQueriesResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportMetadata { /// Report status. pub status: ReportStatus, @@ -509,7 +513,7 @@ impl RequestValue for RunQueryRequest {} /// /// * [uploadlineitems lineitems](struct.LineitemUploadlineitemCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UploadLineItemsResponse { /// Status of upload. #[serde(rename="uploadStatus")] @@ -565,7 +569,7 @@ impl Part for QueryMetadata {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportStatus { /// If the report failed, this records the cause. pub failure: ReportFailure, @@ -590,7 +594,7 @@ impl Part for ReportStatus {} /// /// * [listreports reports](struct.ReportListreportCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListReportsResponse { /// Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#listReportsResponse". pub kind: String, @@ -605,7 +609,7 @@ impl ResponseResult for ListReportsResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RowStatus { /// Whether the entity is persisted. pub persisted: bool, @@ -636,7 +640,7 @@ impl Part for RowStatus {} /// /// * [listreports reports](struct.ReportListreportCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Report { /// Report parameters. pub params: Option, @@ -696,7 +700,7 @@ impl ResponseResult for Query {} /// /// * [downloadlineitems lineitems](struct.LineitemDownloadlineitemCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DownloadLineItemsResponse { /// Retrieved line items in CSV format. Refer to Entity Write File Format for more information on file format. #[serde(rename="lineItems")] @@ -726,7 +730,7 @@ impl Part for FilterPair {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UploadStatus { /// Reasons why upload can't be completed. pub errors: Vec, @@ -1151,22 +1155,21 @@ impl<'a, C, A> LineitemUploadlineitemCall<'a, C, A> where C: BorrowMut LineitemUploadlineitemCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LineitemUploadlineitemCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1351,22 +1354,21 @@ impl<'a, C, A> LineitemDownloadlineitemCall<'a, C, A> where C: BorrowMut LineitemDownloadlineitemCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LineitemDownloadlineitemCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1562,23 +1564,22 @@ impl<'a, C, A> ReportListreportCall<'a, C, A> where C: BorrowMut, } + /// Query ID with which the reports are associated. + /// /// Sets the *query id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Query ID with which the reports are associated. pub fn query_id(mut self, new_value: &str) -> ReportListreportCall<'a, C, A> { self._query_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportListreportCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1748,13 +1749,12 @@ impl<'a, C, A> QueryListqueryCall<'a, C, A> where C: BorrowMut, A } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QueryListqueryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1950,23 +1950,22 @@ impl<'a, C, A> QueryGetqueryCall<'a, C, A> where C: BorrowMut, A: } + /// Query ID to retrieve. + /// /// Sets the *query id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Query ID to retrieve. pub fn query_id(mut self, new_value: &str) -> QueryGetqueryCall<'a, C, A> { self._query_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QueryGetqueryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2151,22 +2150,21 @@ impl<'a, C, A> QueryCreatequeryCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Query) -> QueryCreatequeryCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QueryCreatequeryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2351,23 +2349,22 @@ impl<'a, C, A> QueryDeletequeryCall<'a, C, A> where C: BorrowMut, } + /// Query ID to delete. + /// /// Sets the *query id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Query ID to delete. pub fn query_id(mut self, new_value: &str) -> QueryDeletequeryCall<'a, C, A> { self._query_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QueryDeletequeryCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2567,32 +2564,31 @@ impl<'a, C, A> QueryRunqueryCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &RunQueryRequest) -> QueryRunqueryCall<'a, C, A> { self._request = new_value.clone(); self } + /// Query ID to run. + /// /// Sets the *query id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Query ID to run. pub fn query_id(mut self, new_value: &str) -> QueryRunqueryCall<'a, C, A> { self._query_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QueryRunqueryCall<'a, C, A> { self._delegate = Some(new_value); self diff --git a/gen/doubleclicksearch2/README.md b/gen/doubleclicksearch2/README.md index f9caba4d73..7d2bfea501 100644 --- a/gen/doubleclicksearch2/README.md +++ b/gen/doubleclicksearch2/README.md @@ -108,16 +108,18 @@ let result = hub.reports().get_file("reportId", -48) match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/doubleclicksearch2/src/cmn.rs b/gen/doubleclicksearch2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/doubleclicksearch2/src/cmn.rs +++ b/gen/doubleclicksearch2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/doubleclicksearch2/src/lib.rs b/gen/doubleclicksearch2/src/lib.rs index b5260e074e..f225e90f33 100644 --- a/gen/doubleclicksearch2/src/lib.rs +++ b/gen/doubleclicksearch2/src/lib.rs @@ -109,16 +109,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -276,16 +278,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -452,7 +456,7 @@ impl Part for Conversion {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportRow(HashMap); impl Part for ReportRow {} @@ -462,7 +466,7 @@ impl Part for ReportRow {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportFiles { /// Use this url to download the report file. pub url: String, @@ -680,7 +684,7 @@ impl RequestValue for ReportRequest {} /// * [get reports](struct.ReportGetCall.html) (response) /// * [request reports](struct.ReportRequestCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Report { /// Asynchronous report only. Contains a list of generated report files once the report has succesfully completed. pub files: Vec, @@ -743,7 +747,7 @@ impl Part for ReportRequestTimeRange {} /// /// * [list saved columns](struct.SavedColumnListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SavedColumnList { /// The saved columns being requested. pub items: Vec, @@ -763,7 +767,7 @@ impl ResponseResult for SavedColumnList {} /// /// * [list saved columns](struct.SavedColumnListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SavedColumn { /// The name of the saved column. #[serde(rename="savedColumnName")] @@ -805,7 +809,7 @@ impl RequestValue for UpdateAvailabilityRequest {} /// /// * [update availability conversion](struct.ConversionUpdateAvailabilityCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UpdateAvailabilityResponse { /// The availabilities being returned. pub availabilities: Vec, @@ -1333,22 +1337,21 @@ impl<'a, C, A> ConversionInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &ConversionList) -> ConversionInsertCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ConversionInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1378,8 +1381,8 @@ impl<'a, C, A> ConversionInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1595,115 +1598,110 @@ impl<'a, C, A> ConversionGetCall<'a, C, A> where C: BorrowMut, A: } + /// Numeric ID of the agency. + /// /// Sets the *agency id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Numeric ID of the agency. pub fn agency_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, A> { self._agency_id = new_value.to_string(); self } + /// Numeric ID of the advertiser. + /// /// Sets the *advertiser id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Numeric ID of the advertiser. pub fn advertiser_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, A> { self._advertiser_id = new_value.to_string(); self } + /// Numeric ID of the engine account. + /// /// Sets the *engine account id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Numeric ID of the engine account. pub fn engine_account_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, A> { self._engine_account_id = new_value.to_string(); self } + /// Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// /// Sets the *end date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. pub fn end_date(mut self, new_value: i32) -> ConversionGetCall<'a, C, A> { self._end_date = new_value; self } + /// The number of conversions to return per call. + /// /// Sets the *row count* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The number of conversions to return per call. pub fn row_count(mut self, new_value: i32) -> ConversionGetCall<'a, C, A> { self._row_count = new_value; self } + /// First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// /// Sets the *start date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. pub fn start_date(mut self, new_value: i32) -> ConversionGetCall<'a, C, A> { self._start_date = new_value; self } + /// The 0-based starting index for retrieving conversions results. + /// /// Sets the *start row* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The 0-based starting index for retrieving conversions results. pub fn start_row(mut self, new_value: u32) -> ConversionGetCall<'a, C, A> { self._start_row = new_value; self } - /// Sets the *criterion id* query property to the given value. - /// - /// /// Numeric ID of the criterion. + /// + /// Sets the *criterion id* query property to the given value. pub fn criterion_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, A> { self._criterion_id = Some(new_value.to_string()); self } - /// Sets the *campaign id* query property to the given value. - /// - /// /// Numeric ID of the campaign. + /// + /// Sets the *campaign id* query property to the given value. pub fn campaign_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, A> { self._campaign_id = Some(new_value.to_string()); self } - /// Sets the *ad id* query property to the given value. - /// - /// /// Numeric ID of the ad. + /// + /// Sets the *ad id* query property to the given value. pub fn ad_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, A> { self._ad_id = Some(new_value.to_string()); self } - /// Sets the *ad group id* query property to the given value. - /// - /// /// Numeric ID of the ad group. + /// + /// Sets the *ad group id* query property to the given value. pub fn ad_group_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, A> { self._ad_group_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ConversionGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1733,8 +1731,8 @@ impl<'a, C, A> ConversionGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1907,22 +1905,21 @@ impl<'a, C, A> ConversionUpdateAvailabilityCall<'a, C, A> where C: BorrowMut ConversionUpdateAvailabilityCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ConversionUpdateAvailabilityCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1952,8 +1949,8 @@ impl<'a, C, A> ConversionUpdateAvailabilityCall<'a, C, A> where C: BorrowMut ConversionPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &ConversionList) -> ConversionPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Numeric ID of the advertiser. + /// /// Sets the *advertiser id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Numeric ID of the advertiser. pub fn advertiser_id(mut self, new_value: &str) -> ConversionPatchCall<'a, C, A> { self._advertiser_id = new_value.to_string(); self } + /// Numeric ID of the agency. + /// /// Sets the *agency id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Numeric ID of the agency. pub fn agency_id(mut self, new_value: &str) -> ConversionPatchCall<'a, C, A> { self._agency_id = new_value.to_string(); self } + /// Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// /// Sets the *end date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. pub fn end_date(mut self, new_value: i32) -> ConversionPatchCall<'a, C, A> { self._end_date = new_value; self } + /// Numeric ID of the engine account. + /// /// Sets the *engine account id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Numeric ID of the engine account. pub fn engine_account_id(mut self, new_value: &str) -> ConversionPatchCall<'a, C, A> { self._engine_account_id = new_value.to_string(); self } + /// The number of conversions to return per call. + /// /// Sets the *row count* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The number of conversions to return per call. pub fn row_count(mut self, new_value: i32) -> ConversionPatchCall<'a, C, A> { self._row_count = new_value; self } + /// First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// /// Sets the *start date* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. pub fn start_date(mut self, new_value: i32) -> ConversionPatchCall<'a, C, A> { self._start_date = new_value; self } + /// The 0-based starting index for retrieving conversions results. + /// /// Sets the *start row* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The 0-based starting index for retrieving conversions results. pub fn start_row(mut self, new_value: u32) -> ConversionPatchCall<'a, C, A> { self._start_row = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ConversionPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2255,8 +2251,8 @@ impl<'a, C, A> ConversionPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2429,22 +2425,21 @@ impl<'a, C, A> ConversionUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &ConversionList) -> ConversionUpdateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ConversionUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2474,8 +2469,8 @@ impl<'a, C, A> ConversionUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2661,33 +2656,32 @@ impl<'a, C, A> SavedColumnListCall<'a, C, A> where C: BorrowMut, } + /// DS ID of the agency. + /// /// Sets the *agency id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// DS ID of the agency. pub fn agency_id(mut self, new_value: &str) -> SavedColumnListCall<'a, C, A> { self._agency_id = new_value.to_string(); self } + /// DS ID of the advertiser. + /// /// Sets the *advertiser id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// DS ID of the advertiser. pub fn advertiser_id(mut self, new_value: &str) -> SavedColumnListCall<'a, C, A> { self._advertiser_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SavedColumnListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2717,8 +2711,8 @@ impl<'a, C, A> SavedColumnListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2896,33 +2890,32 @@ impl<'a, C, A> ReportGetFileCall<'a, C, A> where C: BorrowMut, A: } + /// ID of the report. + /// /// Sets the *report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportGetFileCall<'a, C, A> { self._report_id = new_value.to_string(); self } + /// The index of the report fragment to download. + /// /// Sets the *report fragment* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The index of the report fragment to download. pub fn report_fragment(mut self, new_value: i32) -> ReportGetFileCall<'a, C, A> { self._report_fragment = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportGetFileCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2952,8 +2945,8 @@ impl<'a, C, A> ReportGetFileCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3126,22 +3119,21 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &ReportRequest) -> ReportGenerateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportGenerateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3171,8 +3163,8 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3356,23 +3348,22 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// ID of the report request being polled. + /// /// Sets the *report id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the report request being polled. pub fn report_id(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._report_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3402,8 +3393,8 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3576,22 +3567,21 @@ impl<'a, C, A> ReportRequestCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &ReportRequest) -> ReportRequestCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportRequestCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3621,8 +3611,8 @@ impl<'a, C, A> ReportRequestCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/drive2/README.md b/gen/drive2/README.md index 45b10e4ec3..6de3ce5ebc 100644 --- a/gen/drive2/README.md +++ b/gen/drive2/README.md @@ -170,16 +170,18 @@ let result = hub.files().patch(&req, "fileId") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/drive2/src/cmn.rs b/gen/drive2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/drive2/src/cmn.rs +++ b/gen/drive2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/drive2/src/lib.rs b/gen/drive2/src/lib.rs index cdc18b01f2..1813abbdf0 100644 --- a/gen/drive2/src/lib.rs +++ b/gen/drive2/src/lib.rs @@ -171,16 +171,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -380,16 +382,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -569,7 +573,7 @@ impl ResponseResult for Comment {} /// /// * [get about](struct.AboutGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct About { /// The user's language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/). #[serde(rename="languageCode")] @@ -834,7 +838,7 @@ impl ResponseResult for File {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AboutAdditionalRoleInfo { /// The supported additional roles per primary role. #[serde(rename="roleSets")] @@ -857,7 +861,7 @@ impl Part for AboutAdditionalRoleInfo {} /// /// * [list changes](struct.ChangeListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChangeList { /// The page token for the next page of changes. #[serde(rename="nextPageToken")] @@ -891,7 +895,7 @@ impl ResponseResult for ChangeList {} /// /// * [list properties](struct.PropertyListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PropertyList { /// The list of properties. pub items: Vec, @@ -916,7 +920,7 @@ impl ResponseResult for PropertyList {} /// /// * [get id for email permissions](struct.PermissionGetIdForEmailCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PermissionId { /// This is always drive#permissionId. pub kind: String, @@ -945,7 +949,7 @@ impl Part for FileIndexableText {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AboutAdditionalRoleInfoRoleSets { /// A primary permission role. #[serde(rename="primaryRole")] @@ -968,7 +972,7 @@ impl Part for AboutAdditionalRoleInfoRoleSets {} /// /// * [list replies](struct.ReplyListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentReplyList { /// The token to use to request the next page of results. #[serde(rename="nextPageToken")] @@ -992,7 +996,7 @@ impl ResponseResult for CommentReplyList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AboutImportFormats { /// The imported file's content type to convert from. pub source: String, @@ -1013,7 +1017,7 @@ impl Part for AboutImportFormats {} /// /// * [list revisions](struct.RevisionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RevisionList { /// The actual list of revisions. pub items: Vec, @@ -1033,7 +1037,7 @@ impl ResponseResult for RevisionList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AboutMaxUploadSizes { /// The file type. #[serde(rename="type")] @@ -1229,7 +1233,7 @@ impl ResponseResult for Revision {} /// /// * [list comments](struct.CommentListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentList { /// The token to use to request the next page of results. #[serde(rename="nextPageToken")] @@ -1258,7 +1262,7 @@ impl ResponseResult for CommentList {} /// /// * [list parents](struct.ParentListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ParentList { /// The actual list of parents. pub items: Vec, @@ -1283,7 +1287,7 @@ impl ResponseResult for ParentList {} /// /// * [list permissions](struct.PermissionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PermissionList { /// The actual list of permissions. pub items: Vec, @@ -1303,7 +1307,7 @@ impl ResponseResult for PermissionList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AboutQuotaBytesByService { /// The service's name, e.g. DRIVE, GMAIL, or PHOTOS. #[serde(rename="serviceName")] @@ -1460,7 +1464,7 @@ impl Part for FileImageMediaMetadata {} /// * [get apps](struct.AppGetCall.html) (response) /// * [list apps](struct.AppListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct App { /// The list of secondary mime types. #[serde(rename="secondaryMimeTypes")] @@ -1561,7 +1565,7 @@ impl Part for FileImageMediaMetadataLocation {} /// /// * [list files](struct.FileListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FileList { /// The page token for the next page of files. #[serde(rename="nextPageToken")] @@ -1592,7 +1596,7 @@ impl ResponseResult for FileList {} /// /// * [list children](struct.ChildrenListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChildList { /// The page token for the next page of children. #[serde(rename="nextPageToken")] @@ -1676,7 +1680,7 @@ impl Part for UserPicture {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AboutFeatures { /// The name of the feature. #[serde(rename="featureName")] @@ -1726,7 +1730,7 @@ impl Part for User {} /// /// * [list apps](struct.AppListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AppList { /// The actual list of apps. pub items: Vec, @@ -1749,7 +1753,7 @@ impl ResponseResult for AppList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AppIcons { /// Category of the icon. Allowed values are: /// - application - icon for the application @@ -1835,7 +1839,7 @@ impl Part for FileVideoMediaMetadata {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AboutExportFormats { /// The content type to convert from. pub source: String, @@ -1858,7 +1862,7 @@ impl Part for AboutExportFormats {} /// * [watch changes](struct.ChangeWatchCall.html) (none) /// * [get changes](struct.ChangeGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Change { /// The time of this modification. #[serde(rename="modificationDate")] @@ -3600,7 +3604,7 @@ impl<'a, C, A> RevisionMethods<'a, C, A> { /// Subscribe to changes on a file /// /// This method supports **media download**. To enable it, adjust the builder like this: -/// `.param("alt", "media")`. +/// `.alt("media")`. /// Please note that due to missing multi-part support on the server side, you will only receive the media, /// but not the `Channel` structure that you would usually get. The latter will be a default value. /// @@ -3826,72 +3830,66 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> FileWatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID for the file in question. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the file in question. pub fn file_id(mut self, new_value: &str) -> FileWatchCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *update viewed date* query property to the given value. - /// - /// /// Whether to update the view date after successfully retrieving the file. + /// + /// Sets the *update viewed date* query property to the given value. pub fn update_viewed_date(mut self, new_value: bool) -> FileWatchCall<'a, C, A> { self._update_viewed_date = Some(new_value); self } - /// Sets the *revision id* query property to the given value. - /// - /// /// Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified. + /// + /// Sets the *revision id* query property to the given value. pub fn revision_id(mut self, new_value: &str) -> FileWatchCall<'a, C, A> { self._revision_id = Some(new_value.to_string()); self } - /// Sets the *projection* query property to the given value. - /// - /// /// This parameter is deprecated and has no function. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> FileWatchCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *alt* query property to the given value. - /// - /// /// Specifies the type of resource representation to return. The default is 'json' to return file metadata. Specifying 'media' will cause the file content to be returned. + /// + /// Sets the *alt* query property to the given value. pub fn alt(mut self, new_value: &str) -> FileWatchCall<'a, C, A> { self._alt = Some(new_value.to_string()); self } - /// Sets the *acknowledge abuse* query property to the given value. - /// - /// /// Whether the user is acknowledging the risk of downloading known malware or other abusive files. Ignored unless alt=media is specified. + /// + /// Sets the *acknowledge abuse* query property to the given value. pub fn acknowledge_abuse(mut self, new_value: bool) -> FileWatchCall<'a, C, A> { self._acknowledge_abuse = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileWatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3912,7 +3910,6 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. pub fn param(mut self, name: T, value: T) -> FileWatchCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); @@ -3921,8 +3918,8 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4250,86 +4247,77 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa self.doit(resumeable_stream, mime_type, "resumable") } + /// /// Sets the *request* property to the given value. /// /// 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: &File) -> FileInsertCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *visibility* query property to the given value. - /// - /// /// The visibility of the new file. This parameter is only relevant when convert=false. + /// + /// Sets the *visibility* query property to the given value. pub fn visibility(mut self, new_value: &str) -> FileInsertCall<'a, C, A> { self._visibility = Some(new_value.to_string()); self } - /// Sets the *use content as indexable text* query property to the given value. - /// - /// /// Whether to use the content as indexable text. + /// + /// Sets the *use content as indexable text* query property to the given value. pub fn use_content_as_indexable_text(mut self, new_value: bool) -> FileInsertCall<'a, C, A> { self._use_content_as_indexable_text = Some(new_value); self } - /// Sets the *timed text track name* query property to the given value. - /// - /// /// The timed text track name. + /// + /// Sets the *timed text track name* query property to the given value. pub fn timed_text_track_name(mut self, new_value: &str) -> FileInsertCall<'a, C, A> { self._timed_text_track_name = Some(new_value.to_string()); self } - /// Sets the *timed text language* query property to the given value. - /// - /// /// The language of the timed text. + /// + /// Sets the *timed text language* query property to the given value. pub fn timed_text_language(mut self, new_value: &str) -> FileInsertCall<'a, C, A> { self._timed_text_language = Some(new_value.to_string()); self } - /// Sets the *pinned* query property to the given value. - /// - /// /// Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions. + /// + /// Sets the *pinned* query property to the given value. pub fn pinned(mut self, new_value: bool) -> FileInsertCall<'a, C, A> { self._pinned = Some(new_value); self } - /// Sets the *ocr language* query property to the given value. - /// - /// /// If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. + /// + /// Sets the *ocr language* query property to the given value. pub fn ocr_language(mut self, new_value: &str) -> FileInsertCall<'a, C, A> { self._ocr_language = Some(new_value.to_string()); self } - /// Sets the *ocr* query property to the given value. - /// - /// /// Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. + /// + /// Sets the *ocr* query property to the given value. pub fn ocr(mut self, new_value: bool) -> FileInsertCall<'a, C, A> { self._ocr = Some(new_value); self } - /// Sets the *convert* query property to the given value. - /// - /// /// Whether to convert this file to the corresponding Google Docs format. + /// + /// Sets the *convert* query property to the given value. pub fn convert(mut self, new_value: bool) -> FileInsertCall<'a, C, A> { self._convert = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4359,8 +4347,8 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4544,23 +4532,22 @@ impl<'a, C, A> FileUntrashCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the file to untrash. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file to untrash. pub fn file_id(mut self, new_value: &str) -> FileUntrashCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileUntrashCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4590,8 +4577,8 @@ impl<'a, C, A> FileUntrashCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4825,88 +4812,80 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut } + /// /// Sets the *request* property to the given value. /// /// 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: &File) -> FileCopyCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file to copy. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file to copy. pub fn file_id(mut self, new_value: &str) -> FileCopyCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *visibility* query property to the given value. - /// - /// /// The visibility of the new file. This parameter is only relevant when the source is not a native Google Doc and convert=false. + /// + /// Sets the *visibility* query property to the given value. pub fn visibility(mut self, new_value: &str) -> FileCopyCall<'a, C, A> { self._visibility = Some(new_value.to_string()); self } - /// Sets the *timed text track name* query property to the given value. - /// - /// /// The timed text track name. + /// + /// Sets the *timed text track name* query property to the given value. pub fn timed_text_track_name(mut self, new_value: &str) -> FileCopyCall<'a, C, A> { self._timed_text_track_name = Some(new_value.to_string()); self } - /// Sets the *timed text language* query property to the given value. - /// - /// /// The language of the timed text. + /// + /// Sets the *timed text language* query property to the given value. pub fn timed_text_language(mut self, new_value: &str) -> FileCopyCall<'a, C, A> { self._timed_text_language = Some(new_value.to_string()); self } - /// Sets the *pinned* query property to the given value. - /// - /// /// Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions. + /// + /// Sets the *pinned* query property to the given value. pub fn pinned(mut self, new_value: bool) -> FileCopyCall<'a, C, A> { self._pinned = Some(new_value); self } - /// Sets the *ocr language* query property to the given value. - /// - /// /// If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. + /// + /// Sets the *ocr language* query property to the given value. pub fn ocr_language(mut self, new_value: &str) -> FileCopyCall<'a, C, A> { self._ocr_language = Some(new_value.to_string()); self } - /// Sets the *ocr* query property to the given value. - /// - /// /// Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. + /// + /// Sets the *ocr* query property to the given value. pub fn ocr(mut self, new_value: bool) -> FileCopyCall<'a, C, A> { self._ocr = Some(new_value); self } - /// Sets the *convert* query property to the given value. - /// - /// /// Whether to convert this file to the corresponding Google Docs format. + /// + /// Sets the *convert* query property to the given value. pub fn convert(mut self, new_value: bool) -> FileCopyCall<'a, C, A> { self._convert = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileCopyCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4936,8 +4915,8 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5121,23 +5100,22 @@ impl<'a, C, A> FileTrashCall<'a, C, A> where C: BorrowMut, A: oau } + /// The ID of the file to trash. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file to trash. pub fn file_id(mut self, new_value: &str) -> FileTrashCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileTrashCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5167,8 +5145,8 @@ impl<'a, C, A> FileTrashCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5315,13 +5293,12 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileEmptyTrashCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5351,8 +5328,8 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5535,53 +5512,47 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut } - /// Sets the *q* query property to the given value. - /// - /// /// Query string for searching files. + /// + /// Sets the *q* query property to the given value. pub fn q(mut self, new_value: &str) -> FileListCall<'a, C, A> { self._q = Some(new_value.to_string()); self } - /// Sets the *projection* query property to the given value. - /// - /// /// This parameter is deprecated and has no function. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> FileListCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Page token for files. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> FileListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of files to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> FileListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *corpus* query property to the given value. - /// - /// /// The body of items (files/documents) to which the query applies. + /// + /// Sets the *corpus* query property to the given value. pub fn corpus(mut self, new_value: &str) -> FileListCall<'a, C, A> { self._corpus = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5611,8 +5582,8 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AppReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5796,23 +5767,22 @@ impl<'a, C, A> FileTouchCall<'a, C, A> where C: BorrowMut, A: oau } + /// The ID of the file to update. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file to update. pub fn file_id(mut self, new_value: &str) -> FileTouchCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileTouchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5842,8 +5812,8 @@ impl<'a, C, A> FileTouchCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6217,128 +6187,115 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa self.doit(resumeable_stream, mime_type, "resumable") } + /// /// Sets the *request* property to the given value. /// /// 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: &File) -> FileUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file to update. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file to update. pub fn file_id(mut self, new_value: &str) -> FileUpdateCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *use content as indexable text* query property to the given value. - /// - /// /// Whether to use the content as indexable text. + /// + /// Sets the *use content as indexable text* query property to the given value. pub fn use_content_as_indexable_text(mut self, new_value: bool) -> FileUpdateCall<'a, C, A> { self._use_content_as_indexable_text = Some(new_value); self } - /// Sets the *update viewed date* query property to the given value. - /// - /// /// Whether to update the view date after successfully updating the file. + /// + /// Sets the *update viewed date* query property to the given value. pub fn update_viewed_date(mut self, new_value: bool) -> FileUpdateCall<'a, C, A> { self._update_viewed_date = Some(new_value); self } - /// Sets the *timed text track name* query property to the given value. - /// - /// /// The timed text track name. + /// + /// Sets the *timed text track name* query property to the given value. pub fn timed_text_track_name(mut self, new_value: &str) -> FileUpdateCall<'a, C, A> { self._timed_text_track_name = Some(new_value.to_string()); self } - /// Sets the *timed text language* query property to the given value. - /// - /// /// The language of the timed text. + /// + /// Sets the *timed text language* query property to the given value. pub fn timed_text_language(mut self, new_value: &str) -> FileUpdateCall<'a, C, A> { self._timed_text_language = Some(new_value.to_string()); self } - /// Sets the *set modified date* query property to the given value. - /// - /// /// Whether to set the modified date with the supplied modified date. + /// + /// Sets the *set modified date* query property to the given value. pub fn set_modified_date(mut self, new_value: bool) -> FileUpdateCall<'a, C, A> { self._set_modified_date = Some(new_value); self } - /// Sets the *remove parents* query property to the given value. - /// - /// /// Comma-separated list of parent IDs to remove. + /// + /// Sets the *remove parents* query property to the given value. pub fn remove_parents(mut self, new_value: &str) -> FileUpdateCall<'a, C, A> { self._remove_parents = Some(new_value.to_string()); self } - /// Sets the *pinned* query property to the given value. - /// - /// /// Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. + /// + /// Sets the *pinned* query property to the given value. pub fn pinned(mut self, new_value: bool) -> FileUpdateCall<'a, C, A> { self._pinned = Some(new_value); self } - /// Sets the *ocr language* query property to the given value. - /// - /// /// If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. + /// + /// Sets the *ocr language* query property to the given value. pub fn ocr_language(mut self, new_value: &str) -> FileUpdateCall<'a, C, A> { self._ocr_language = Some(new_value.to_string()); self } - /// Sets the *ocr* query property to the given value. - /// - /// /// Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. + /// + /// Sets the *ocr* query property to the given value. pub fn ocr(mut self, new_value: bool) -> FileUpdateCall<'a, C, A> { self._ocr = Some(new_value); self } - /// Sets the *new revision* query property to the given value. - /// - /// /// Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous revisions are preserved (causing increased use of the user's data storage quota). + /// + /// Sets the *new revision* query property to the given value. pub fn new_revision(mut self, new_value: bool) -> FileUpdateCall<'a, C, A> { self._new_revision = Some(new_value); self } - /// Sets the *convert* query property to the given value. - /// - /// /// Whether to convert this file to the corresponding Google Docs format. + /// + /// Sets the *convert* query property to the given value. pub fn convert(mut self, new_value: bool) -> FileUpdateCall<'a, C, A> { self._convert = Some(new_value); self } - /// Sets the *add parents* query property to the given value. - /// - /// /// Comma-separated list of parent IDs to add. + /// + /// Sets the *add parents* query property to the given value. pub fn add_parents(mut self, new_value: &str) -> FileUpdateCall<'a, C, A> { self._add_parents = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6368,8 +6325,8 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6542,23 +6499,22 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the file to delete. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file to delete. pub fn file_id(mut self, new_value: &str) -> FileDeleteCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6588,8 +6544,8 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6848,128 +6804,115 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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: &File) -> FilePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file to update. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file to update. pub fn file_id(mut self, new_value: &str) -> FilePatchCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *use content as indexable text* query property to the given value. - /// - /// /// Whether to use the content as indexable text. + /// + /// Sets the *use content as indexable text* query property to the given value. pub fn use_content_as_indexable_text(mut self, new_value: bool) -> FilePatchCall<'a, C, A> { self._use_content_as_indexable_text = Some(new_value); self } - /// Sets the *update viewed date* query property to the given value. - /// - /// /// Whether to update the view date after successfully updating the file. + /// + /// Sets the *update viewed date* query property to the given value. pub fn update_viewed_date(mut self, new_value: bool) -> FilePatchCall<'a, C, A> { self._update_viewed_date = Some(new_value); self } - /// Sets the *timed text track name* query property to the given value. - /// - /// /// The timed text track name. + /// + /// Sets the *timed text track name* query property to the given value. pub fn timed_text_track_name(mut self, new_value: &str) -> FilePatchCall<'a, C, A> { self._timed_text_track_name = Some(new_value.to_string()); self } - /// Sets the *timed text language* query property to the given value. - /// - /// /// The language of the timed text. + /// + /// Sets the *timed text language* query property to the given value. pub fn timed_text_language(mut self, new_value: &str) -> FilePatchCall<'a, C, A> { self._timed_text_language = Some(new_value.to_string()); self } - /// Sets the *set modified date* query property to the given value. - /// - /// /// Whether to set the modified date with the supplied modified date. + /// + /// Sets the *set modified date* query property to the given value. pub fn set_modified_date(mut self, new_value: bool) -> FilePatchCall<'a, C, A> { self._set_modified_date = Some(new_value); self } - /// Sets the *remove parents* query property to the given value. - /// - /// /// Comma-separated list of parent IDs to remove. + /// + /// Sets the *remove parents* query property to the given value. pub fn remove_parents(mut self, new_value: &str) -> FilePatchCall<'a, C, A> { self._remove_parents = Some(new_value.to_string()); self } - /// Sets the *pinned* query property to the given value. - /// - /// /// Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. + /// + /// Sets the *pinned* query property to the given value. pub fn pinned(mut self, new_value: bool) -> FilePatchCall<'a, C, A> { self._pinned = Some(new_value); self } - /// Sets the *ocr language* query property to the given value. - /// - /// /// If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. + /// + /// Sets the *ocr language* query property to the given value. pub fn ocr_language(mut self, new_value: &str) -> FilePatchCall<'a, C, A> { self._ocr_language = Some(new_value.to_string()); self } - /// Sets the *ocr* query property to the given value. - /// - /// /// Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. + /// + /// Sets the *ocr* query property to the given value. pub fn ocr(mut self, new_value: bool) -> FilePatchCall<'a, C, A> { self._ocr = Some(new_value); self } - /// Sets the *new revision* query property to the given value. - /// - /// /// Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous revisions are preserved (causing increased use of the user's data storage quota). + /// + /// Sets the *new revision* query property to the given value. pub fn new_revision(mut self, new_value: bool) -> FilePatchCall<'a, C, A> { self._new_revision = Some(new_value); self } - /// Sets the *convert* query property to the given value. - /// - /// /// Whether to convert this file to the corresponding Google Docs format. + /// + /// Sets the *convert* query property to the given value. pub fn convert(mut self, new_value: bool) -> FilePatchCall<'a, C, A> { self._convert = Some(new_value); self } - /// Sets the *add parents* query property to the given value. - /// - /// /// Comma-separated list of parent IDs to add. + /// + /// Sets the *add parents* query property to the given value. pub fn add_parents(mut self, new_value: &str) -> FilePatchCall<'a, C, A> { self._add_parents = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FilePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6999,8 +6942,8 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7019,7 +6962,7 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau /// Gets a file's metadata by ID. /// /// This method supports **media download**. To enable it, adjust the builder like this: -/// `.param("alt", "media")`. +/// `.alt("media")`. /// Please note that due to missing multi-part support on the server side, you will only receive the media, /// but not the `File` structure that you would usually get. The latter will be a default value. /// @@ -7230,63 +7173,57 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// The ID for the file in question. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the file in question. pub fn file_id(mut self, new_value: &str) -> FileGetCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *update viewed date* query property to the given value. - /// - /// /// Whether to update the view date after successfully retrieving the file. + /// + /// Sets the *update viewed date* query property to the given value. pub fn update_viewed_date(mut self, new_value: bool) -> FileGetCall<'a, C, A> { self._update_viewed_date = Some(new_value); self } - /// Sets the *revision id* query property to the given value. - /// - /// /// Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified. + /// + /// Sets the *revision id* query property to the given value. pub fn revision_id(mut self, new_value: &str) -> FileGetCall<'a, C, A> { self._revision_id = Some(new_value.to_string()); self } - /// Sets the *projection* query property to the given value. - /// - /// /// This parameter is deprecated and has no function. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> FileGetCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } - /// Sets the *alt* query property to the given value. - /// - /// /// Specifies the type of resource representation to return. The default is 'json' to return file metadata. Specifying 'media' will cause the file content to be returned. + /// + /// Sets the *alt* query property to the given value. pub fn alt(mut self, new_value: &str) -> FileGetCall<'a, C, A> { self._alt = Some(new_value.to_string()); self } - /// Sets the *acknowledge abuse* query property to the given value. - /// - /// /// Whether the user is acknowledging the risk of downloading known malware or other abusive files. Ignored unless alt=media is specified. + /// + /// Sets the *acknowledge abuse* query property to the given value. pub fn acknowledge_abuse(mut self, new_value: bool) -> FileGetCall<'a, C, A> { self._acknowledge_abuse = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> FileGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7307,7 +7244,6 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. pub fn param(mut self, name: T, value: T) -> FileGetCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); @@ -7316,8 +7252,8 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AppReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7418,7 +7354,7 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/drive/v2/about".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -7490,37 +7426,33 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut } - /// Sets the *start change id* query property to the given value. - /// - /// /// Change ID to start counting from when calculating number of remaining change IDs + /// + /// Sets the *start change id* query property to the given value. pub fn start_change_id(mut self, new_value: &str) -> AboutGetCall<'a, C, A> { self._start_change_id = Some(new_value.to_string()); self } - /// Sets the *max change id count* query property to the given value. - /// - /// /// Maximum number of remaining change IDs to count + /// + /// Sets the *max change id count* query property to the given value. pub fn max_change_id_count(mut self, new_value: i64) -> AboutGetCall<'a, C, A> { self._max_change_id_count = Some(new_value); self } - /// Sets the *include subscribed* query property to the given value. - /// - /// /// When calculating the number of remaining change IDs, whether to include public files the user has opened and shared files. When set to false, this counts only change IDs for owned files and any shared or public files that the user has explicitly added to a folder they own. + /// + /// Sets the *include subscribed* query property to the given value. pub fn include_subscribed(mut self, new_value: bool) -> AboutGetCall<'a, C, A> { self._include_subscribed = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AboutGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7550,8 +7482,8 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7839,31 +7771,29 @@ impl<'a, C, A> RealtimeUpdateCall<'a, C, A> where C: BorrowMut, A self.doit(resumeable_stream, mime_type, "resumable") } + /// The ID of the file that the Realtime API data model is associated with. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file that the Realtime API data model is associated with. pub fn file_id(mut self, new_value: &str) -> RealtimeUpdateCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *base revision* query property to the given value. - /// - /// /// The revision of the model to diff the uploaded model against. If set, the uploaded model is diffed against the provided revision and those differences are merged with any changes made to the model after the provided revision. If not set, the uploaded model replaces the current model on the server. + /// + /// Sets the *base revision* query property to the given value. pub fn base_revision(mut self, new_value: &str) -> RealtimeUpdateCall<'a, C, A> { self._base_revision = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RealtimeUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7893,8 +7823,8 @@ impl<'a, C, A> RealtimeUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7989,7 +7919,7 @@ impl<'a, C, A> RealtimeGetCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/realtime".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { @@ -8075,31 +8005,29 @@ impl<'a, C, A> RealtimeGetCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the file that the Realtime API data model is associated with. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file that the Realtime API data model is associated with. pub fn file_id(mut self, new_value: &str) -> RealtimeGetCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *revision* query property to the given value. - /// - /// /// The revision of the Realtime API data model to export. Revisions start at 1 (the initial empty data model) and are incremented with each change. If this parameter is excluded, the most recent data model will be returned. + /// + /// Sets the *revision* query property to the given value. pub fn revision(mut self, new_value: i32) -> RealtimeGetCall<'a, C, A> { self._revision = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RealtimeGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8129,8 +8057,8 @@ impl<'a, C, A> RealtimeGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8314,23 +8242,22 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } + /// The ID of the app. + /// /// Sets the *app id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the app. pub fn app_id(mut self, new_value: &str) -> AppGetCall<'a, C, A> { self._app_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AppGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8360,8 +8287,8 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AppReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8534,37 +8461,33 @@ impl<'a, C, A> AppListCall<'a, C, A> where C: BorrowMut, A: oauth } - /// Sets the *language code* query property to the given value. - /// - /// /// A language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/). + /// + /// Sets the *language code* query property to the given value. pub fn language_code(mut self, new_value: &str) -> AppListCall<'a, C, A> { self._language_code = Some(new_value.to_string()); self } - /// Sets the *app filter mime types* query property to the given value. - /// - /// /// A comma-separated list of MIME types for open with filtering. All apps within the given app query scope which can open any of the given MIME types will be included in the response. If appFilterExtensions are provided as well, the result is a union of the two resulting app lists. + /// + /// Sets the *app filter mime types* query property to the given value. pub fn app_filter_mime_types(mut self, new_value: &str) -> AppListCall<'a, C, A> { self._app_filter_mime_types = Some(new_value.to_string()); self } - /// Sets the *app filter extensions* query property to the given value. - /// - /// /// A comma-separated list of file extensions for open with filtering. All apps within the given app query scope which can open any of the given file extensions will be included in the response. If appFilterMimeTypes are provided as well, the result is a union of the two resulting app lists. + /// + /// Sets the *app filter extensions* query property to the given value. pub fn app_filter_extensions(mut self, new_value: &str) -> AppListCall<'a, C, A> { self._app_filter_extensions = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AppListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8594,8 +8517,8 @@ impl<'a, C, A> AppListCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AppReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8770,33 +8693,32 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> CommentDeleteCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the comment. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment. pub fn comment_id(mut self, new_value: &str) -> CommentDeleteCall<'a, C, A> { self._comment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8826,8 +8748,8 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8922,7 +8844,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId"), ("{commentId}", "commentId")].iter() { @@ -9018,41 +8940,39 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> CommentGetCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the comment. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment. pub fn comment_id(mut self, new_value: &str) -> CommentGetCall<'a, C, A> { self._comment_id = new_value.to_string(); self } - /// Sets the *include deleted* query property to the given value. - /// - /// /// If set, this will succeed when retrieving a deleted comment, and will include any deleted replies. + /// + /// Sets the *include deleted* query property to the given value. pub fn include_deleted(mut self, new_value: bool) -> CommentGetCall<'a, C, A> { self._include_deleted = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9082,8 +9002,8 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9282,32 +9202,31 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Comment) -> CommentInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> CommentInsertCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9337,8 +9256,8 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9539,42 +9458,41 @@ impl<'a, C, A> CommentPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Comment) -> CommentPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> CommentPatchCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the comment. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment. pub fn comment_id(mut self, new_value: &str) -> CommentPatchCall<'a, C, A> { self._comment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9604,8 +9522,8 @@ impl<'a, C, A> CommentPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9806,42 +9724,41 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Comment) -> CommentUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> CommentUpdateCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the comment. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment. pub fn comment_id(mut self, new_value: &str) -> CommentUpdateCall<'a, C, A> { self._comment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9871,8 +9788,8 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9980,7 +9897,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { @@ -10076,55 +9993,50 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> CommentListCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *updated min* query property to the given value. - /// - /// /// Only discussions that were updated after this timestamp will be returned. Formatted as an RFC 3339 timestamp. + /// + /// Sets the *updated min* query property to the given value. pub fn updated_min(mut self, new_value: &str) -> CommentListCall<'a, C, A> { self._updated_min = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CommentListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of discussions to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> CommentListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *include deleted* query property to the given value. - /// - /// /// If set, all comments and replies, including deleted comments and replies (with content stripped) will be returned. + /// + /// Sets the *include deleted* query property to the given value. pub fn include_deleted(mut self, new_value: bool) -> CommentListCall<'a, C, A> { self._include_deleted = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CommentListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10154,8 +10066,8 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10258,7 +10170,7 @@ impl<'a, C, A> ChildrenListCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/drive/v2/files/{folderId}/children".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{folderId}", "folderId")].iter() { @@ -10354,47 +10266,43 @@ impl<'a, C, A> ChildrenListCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the folder. + /// /// Sets the *folder id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the folder. pub fn folder_id(mut self, new_value: &str) -> ChildrenListCall<'a, C, A> { self._folder_id = new_value.to_string(); self } - /// Sets the *q* query property to the given value. - /// - /// /// Query string for searching children. + /// + /// Sets the *q* query property to the given value. pub fn q(mut self, new_value: &str) -> ChildrenListCall<'a, C, A> { self._q = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Page token for children. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ChildrenListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of children to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ChildrenListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChildrenListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10424,8 +10332,8 @@ impl<'a, C, A> ChildrenListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10515,7 +10423,7 @@ impl<'a, C, A> ChildrenGetCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/drive/v2/files/{folderId}/children/{childId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{folderId}", "folderId"), ("{childId}", "childId")].iter() { @@ -10611,33 +10519,32 @@ impl<'a, C, A> ChildrenGetCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the folder. + /// /// Sets the *folder id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the folder. pub fn folder_id(mut self, new_value: &str) -> ChildrenGetCall<'a, C, A> { self._folder_id = new_value.to_string(); self } + /// The ID of the child. + /// /// Sets the *child id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the child. pub fn child_id(mut self, new_value: &str) -> ChildrenGetCall<'a, C, A> { self._child_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChildrenGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10667,8 +10574,8 @@ impl<'a, C, A> ChildrenGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10843,33 +10750,32 @@ impl<'a, C, A> ChildrenDeleteCall<'a, C, A> where C: BorrowMut, A } + /// The ID of the folder. + /// /// Sets the *folder id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the folder. pub fn folder_id(mut self, new_value: &str) -> ChildrenDeleteCall<'a, C, A> { self._folder_id = new_value.to_string(); self } + /// The ID of the child. + /// /// Sets the *child id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the child. pub fn child_id(mut self, new_value: &str) -> ChildrenDeleteCall<'a, C, A> { self._child_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChildrenDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10899,8 +10805,8 @@ impl<'a, C, A> ChildrenDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11099,32 +11005,31 @@ impl<'a, C, A> ChildrenInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &ChildReference) -> ChildrenInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the folder. + /// /// Sets the *folder id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the folder. pub fn folder_id(mut self, new_value: &str) -> ChildrenInsertCall<'a, C, A> { self._folder_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChildrenInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11154,8 +11059,8 @@ impl<'a, C, A> ChildrenInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11317,22 +11222,21 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> ChannelStopCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChannelStopCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11362,8 +11266,8 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11451,7 +11355,7 @@ impl<'a, C, A> ParentListCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/parents".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { @@ -11547,23 +11451,22 @@ impl<'a, C, A> ParentListCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> ParentListCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ParentListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11593,8 +11496,8 @@ impl<'a, C, A> ParentListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11769,33 +11672,32 @@ impl<'a, C, A> ParentDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> ParentDeleteCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the parent. + /// /// Sets the *parent id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the parent. pub fn parent_id(mut self, new_value: &str) -> ParentDeleteCall<'a, C, A> { self._parent_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ParentDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11825,8 +11727,8 @@ impl<'a, C, A> ParentDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12025,32 +11927,31 @@ impl<'a, C, A> ParentInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &ParentReference) -> ParentInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> ParentInsertCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ParentInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12080,8 +11981,8 @@ impl<'a, C, A> ParentInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12171,7 +12072,7 @@ impl<'a, C, A> ParentGetCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/parents/{parentId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId"), ("{parentId}", "parentId")].iter() { @@ -12267,33 +12168,32 @@ impl<'a, C, A> ParentGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> ParentGetCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the parent. + /// /// Sets the *parent id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the parent. pub fn parent_id(mut self, new_value: &str) -> ParentGetCall<'a, C, A> { self._parent_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ParentGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12323,8 +12223,8 @@ impl<'a, C, A> ParentGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12527,52 +12427,51 @@ impl<'a, C, A> ReplyPatchCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &CommentReply) -> ReplyPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> ReplyPatchCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the comment. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment. pub fn comment_id(mut self, new_value: &str) -> ReplyPatchCall<'a, C, A> { self._comment_id = new_value.to_string(); self } + /// The ID of the reply. + /// /// Sets the *reply id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the reply. pub fn reply_id(mut self, new_value: &str) -> ReplyPatchCall<'a, C, A> { self._reply_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReplyPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12602,8 +12501,8 @@ impl<'a, C, A> ReplyPatchCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12708,7 +12607,7 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}/replies".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId"), ("{commentId}", "commentId")].iter() { @@ -12804,57 +12703,53 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> ReplyListCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the comment. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment. pub fn comment_id(mut self, new_value: &str) -> ReplyListCall<'a, C, A> { self._comment_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ReplyListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of replies to include in the response, used for paging. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ReplyListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *include deleted* query property to the given value. - /// - /// /// If set, all replies, including deleted replies (with content stripped) will be returned. + /// + /// Sets the *include deleted* query property to the given value. pub fn include_deleted(mut self, new_value: bool) -> ReplyListCall<'a, C, A> { self._include_deleted = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReplyListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12884,8 +12779,8 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12982,7 +12877,7 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId"), ("{commentId}", "commentId"), ("{replyId}", "replyId")].iter() { @@ -13078,51 +12973,49 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> ReplyGetCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the comment. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment. pub fn comment_id(mut self, new_value: &str) -> ReplyGetCall<'a, C, A> { self._comment_id = new_value.to_string(); self } + /// The ID of the reply. + /// /// Sets the *reply id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the reply. pub fn reply_id(mut self, new_value: &str) -> ReplyGetCall<'a, C, A> { self._reply_id = new_value.to_string(); self } - /// Sets the *include deleted* query property to the given value. - /// - /// /// If set, this will succeed when retrieving a deleted reply. + /// + /// Sets the *include deleted* query property to the given value. pub fn include_deleted(mut self, new_value: bool) -> ReplyGetCall<'a, C, A> { self._include_deleted = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReplyGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13152,8 +13045,8 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13354,42 +13247,41 @@ impl<'a, C, A> ReplyInsertCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &CommentReply) -> ReplyInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> ReplyInsertCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the comment. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment. pub fn comment_id(mut self, new_value: &str) -> ReplyInsertCall<'a, C, A> { self._comment_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReplyInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13419,8 +13311,8 @@ impl<'a, C, A> ReplyInsertCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13597,43 +13489,42 @@ impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> ReplyDeleteCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the comment. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment. pub fn comment_id(mut self, new_value: &str) -> ReplyDeleteCall<'a, C, A> { self._comment_id = new_value.to_string(); self } + /// The ID of the reply. + /// /// Sets the *reply id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the reply. pub fn reply_id(mut self, new_value: &str) -> ReplyDeleteCall<'a, C, A> { self._reply_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReplyDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13663,8 +13554,8 @@ impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13867,52 +13758,51 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &CommentReply) -> ReplyUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> ReplyUpdateCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the comment. + /// /// Sets the *comment id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the comment. pub fn comment_id(mut self, new_value: &str) -> ReplyUpdateCall<'a, C, A> { self._comment_id = new_value.to_string(); self } + /// The ID of the reply. + /// /// Sets the *reply id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the reply. pub fn reply_id(mut self, new_value: &str) -> ReplyUpdateCall<'a, C, A> { self._reply_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReplyUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13942,8 +13832,8 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14118,33 +14008,32 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, } + /// The ID for the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the file. pub fn file_id(mut self, new_value: &str) -> PermissionDeleteCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID for the permission. + /// /// Sets the *permission id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the permission. pub fn permission_id(mut self, new_value: &str) -> PermissionDeleteCall<'a, C, A> { self._permission_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PermissionDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14174,8 +14063,8 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14384,48 +14273,45 @@ impl<'a, C, A> PermissionInsertCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Permission) -> PermissionInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID for the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the file. pub fn file_id(mut self, new_value: &str) -> PermissionInsertCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *send notification emails* query property to the given value. - /// - /// /// Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner. + /// + /// Sets the *send notification emails* query property to the given value. pub fn send_notification_emails(mut self, new_value: bool) -> PermissionInsertCall<'a, C, A> { self._send_notification_emails = Some(new_value); self } - /// Sets the *email message* query property to the given value. - /// - /// /// A custom message to include in notification emails. + /// + /// Sets the *email message* query property to the given value. pub fn email_message(mut self, new_value: &str) -> PermissionInsertCall<'a, C, A> { self._email_message = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PermissionInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14455,8 +14341,8 @@ impl<'a, C, A> PermissionInsertCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14662,50 +14548,48 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Permission) -> PermissionUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID for the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the file. pub fn file_id(mut self, new_value: &str) -> PermissionUpdateCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID for the permission. + /// /// Sets the *permission id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the permission. pub fn permission_id(mut self, new_value: &str) -> PermissionUpdateCall<'a, C, A> { self._permission_id = new_value.to_string(); self } - /// Sets the *transfer ownership* query property to the given value. - /// - /// /// Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'. + /// + /// Sets the *transfer ownership* query property to the given value. pub fn transfer_ownership(mut self, new_value: bool) -> PermissionUpdateCall<'a, C, A> { self._transfer_ownership = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PermissionUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14735,8 +14619,8 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14942,50 +14826,48 @@ impl<'a, C, A> PermissionPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Permission) -> PermissionPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID for the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the file. pub fn file_id(mut self, new_value: &str) -> PermissionPatchCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID for the permission. + /// /// Sets the *permission id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the permission. pub fn permission_id(mut self, new_value: &str) -> PermissionPatchCall<'a, C, A> { self._permission_id = new_value.to_string(); self } - /// Sets the *transfer ownership* query property to the given value. - /// - /// /// Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'. + /// + /// Sets the *transfer ownership* query property to the given value. pub fn transfer_ownership(mut self, new_value: bool) -> PermissionPatchCall<'a, C, A> { self._transfer_ownership = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PermissionPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15015,8 +14897,8 @@ impl<'a, C, A> PermissionPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15104,7 +14986,7 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/permissions".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { @@ -15200,23 +15082,22 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A } + /// The ID for the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the file. pub fn file_id(mut self, new_value: &str) -> PermissionListCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PermissionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15246,8 +15127,8 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15337,7 +15218,7 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/permissions/{permissionId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId"), ("{permissionId}", "permissionId")].iter() { @@ -15433,33 +15314,32 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: } + /// The ID for the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the file. pub fn file_id(mut self, new_value: &str) -> PermissionGetCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID for the permission. + /// /// Sets the *permission id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the permission. pub fn permission_id(mut self, new_value: &str) -> PermissionGetCall<'a, C, A> { self._permission_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PermissionGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15489,8 +15369,8 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15674,23 +15554,22 @@ impl<'a, C, A> PermissionGetIdForEmailCall<'a, C, A> where C: BorrowMut PermissionGetIdForEmailCall<'a, C, A> { self._email = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PermissionGetIdForEmailCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15720,8 +15599,8 @@ impl<'a, C, A> PermissionGetIdForEmailCall<'a, C, A> where C: BorrowMut ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Channel) -> ChangeWatchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *start change id* query property to the given value. - /// - /// /// Change ID to start listing changes from. + /// + /// Sets the *start change id* query property to the given value. pub fn start_change_id(mut self, new_value: &str) -> ChangeWatchCall<'a, C, A> { self._start_change_id = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Page token for changes. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ChangeWatchCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of changes to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ChangeWatchCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *include subscribed* query property to the given value. - /// - /// /// Whether to include public files the user has opened and shared files. When set to false, the list only includes owned files plus any shared or public files the user has explicitly added to a folder they own. + /// + /// Sets the *include subscribed* query property to the given value. pub fn include_subscribed(mut self, new_value: bool) -> ChangeWatchCall<'a, C, A> { self._include_subscribed = Some(new_value); self } - /// Sets the *include deleted* query property to the given value. - /// - /// /// Whether to include deleted items. + /// + /// Sets the *include deleted* query property to the given value. pub fn include_deleted(mut self, new_value: bool) -> ChangeWatchCall<'a, C, A> { self._include_deleted = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChangeWatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16004,8 +15877,8 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16188,53 +16061,47 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa } - /// Sets the *start change id* query property to the given value. - /// - /// /// Change ID to start listing changes from. + /// + /// Sets the *start change id* query property to the given value. pub fn start_change_id(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { self._start_change_id = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Page token for changes. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of changes to return. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ChangeListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *include subscribed* query property to the given value. - /// - /// /// Whether to include public files the user has opened and shared files. When set to false, the list only includes owned files plus any shared or public files the user has explicitly added to a folder they own. + /// + /// Sets the *include subscribed* query property to the given value. pub fn include_subscribed(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { self._include_subscribed = Some(new_value); self } - /// Sets the *include deleted* query property to the given value. - /// - /// /// Whether to include deleted items. + /// + /// Sets the *include deleted* query property to the given value. pub fn include_deleted(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { self._include_deleted = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChangeListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16264,8 +16131,8 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AppReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16449,23 +16316,22 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// The ID of the change. + /// /// Sets the *change id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the change. pub fn change_id(mut self, new_value: &str) -> ChangeGetCall<'a, C, A> { self._change_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ChangeGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16495,8 +16361,8 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AppReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16702,50 +16568,48 @@ impl<'a, C, A> PropertyPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Property) -> PropertyPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> PropertyPatchCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The key of the property. + /// /// Sets the *property key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The key of the property. pub fn property_key(mut self, new_value: &str) -> PropertyPatchCall<'a, C, A> { self._property_key = new_value.to_string(); self } - /// Sets the *visibility* query property to the given value. - /// - /// /// The visibility of the property. + /// + /// Sets the *visibility* query property to the given value. pub fn visibility(mut self, new_value: &str) -> PropertyPatchCall<'a, C, A> { self._visibility = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PropertyPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16775,8 +16639,8 @@ impl<'a, C, A> PropertyPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16956,41 +16820,39 @@ impl<'a, C, A> PropertyDeleteCall<'a, C, A> where C: BorrowMut, A } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> PropertyDeleteCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The key of the property. + /// /// Sets the *property key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The key of the property. pub fn property_key(mut self, new_value: &str) -> PropertyDeleteCall<'a, C, A> { self._property_key = new_value.to_string(); self } - /// Sets the *visibility* query property to the given value. - /// - /// /// The visibility of the property. + /// + /// Sets the *visibility* query property to the given value. pub fn visibility(mut self, new_value: &str) -> PropertyDeleteCall<'a, C, A> { self._visibility = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PropertyDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17020,8 +16882,8 @@ impl<'a, C, A> PropertyDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17220,32 +17082,31 @@ impl<'a, C, A> PropertyInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Property) -> PropertyInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> PropertyInsertCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PropertyInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17275,8 +17136,8 @@ impl<'a, C, A> PropertyInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17364,7 +17225,7 @@ impl<'a, C, A> PropertyListCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/properties".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { @@ -17460,23 +17321,22 @@ impl<'a, C, A> PropertyListCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> PropertyListCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PropertyListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17506,8 +17366,8 @@ impl<'a, C, A> PropertyListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17713,50 +17573,48 @@ impl<'a, C, A> PropertyUpdateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Property) -> PropertyUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> PropertyUpdateCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The key of the property. + /// /// Sets the *property key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The key of the property. pub fn property_key(mut self, new_value: &str) -> PropertyUpdateCall<'a, C, A> { self._property_key = new_value.to_string(); self } - /// Sets the *visibility* query property to the given value. - /// - /// /// The visibility of the property. + /// + /// Sets the *visibility* query property to the given value. pub fn visibility(mut self, new_value: &str) -> PropertyUpdateCall<'a, C, A> { self._visibility = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PropertyUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17786,8 +17644,8 @@ impl<'a, C, A> PropertyUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17882,7 +17740,7 @@ impl<'a, C, A> PropertyGetCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/properties/{propertyKey}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId"), ("{propertyKey}", "propertyKey")].iter() { @@ -17978,41 +17836,39 @@ impl<'a, C, A> PropertyGetCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> PropertyGetCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The key of the property. + /// /// Sets the *property key* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The key of the property. pub fn property_key(mut self, new_value: &str) -> PropertyGetCall<'a, C, A> { self._property_key = new_value.to_string(); self } - /// Sets the *visibility* query property to the given value. - /// - /// /// The visibility of the property. + /// + /// Sets the *visibility* query property to the given value. pub fn visibility(mut self, new_value: &str) -> PropertyGetCall<'a, C, A> { self._visibility = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PropertyGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18042,8 +17898,8 @@ impl<'a, C, A> PropertyGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18133,7 +17989,7 @@ impl<'a, C, A> RevisionGetCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/revisions/{revisionId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId"), ("{revisionId}", "revisionId")].iter() { @@ -18229,33 +18085,32 @@ impl<'a, C, A> RevisionGetCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> RevisionGetCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the revision. + /// /// Sets the *revision id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the revision. pub fn revision_id(mut self, new_value: &str) -> RevisionGetCall<'a, C, A> { self._revision_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RevisionGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18285,8 +18140,8 @@ impl<'a, C, A> RevisionGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18461,33 +18316,32 @@ impl<'a, C, A> RevisionDeleteCall<'a, C, A> where C: BorrowMut, A } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> RevisionDeleteCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID of the revision. + /// /// Sets the *revision id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the revision. pub fn revision_id(mut self, new_value: &str) -> RevisionDeleteCall<'a, C, A> { self._revision_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RevisionDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18517,8 +18371,8 @@ impl<'a, C, A> RevisionDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18719,42 +18573,41 @@ impl<'a, C, A> RevisionUpdateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Revision) -> RevisionUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID for the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the file. pub fn file_id(mut self, new_value: &str) -> RevisionUpdateCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID for the revision. + /// /// Sets the *revision id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the revision. pub fn revision_id(mut self, new_value: &str) -> RevisionUpdateCall<'a, C, A> { self._revision_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RevisionUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18784,8 +18637,8 @@ impl<'a, C, A> RevisionUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -18873,7 +18726,7 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/revisions".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { @@ -18969,23 +18822,22 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the file. pub fn file_id(mut self, new_value: &str) -> RevisionListCall<'a, C, A> { self._file_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RevisionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19015,8 +18867,8 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -19217,42 +19069,41 @@ impl<'a, C, A> RevisionPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Revision) -> RevisionPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID for the file. + /// /// Sets the *file id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the file. pub fn file_id(mut self, new_value: &str) -> RevisionPatchCall<'a, C, A> { self._file_id = new_value.to_string(); self } + /// The ID for the revision. + /// /// Sets the *revision id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID for the revision. pub fn revision_id(mut self, new_value: &str) -> RevisionPatchCall<'a, C, A> { self._revision_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RevisionPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -19282,8 +19133,8 @@ impl<'a, C, A> RevisionPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/fitness1/README.md b/gen/fitness1/README.md index 39fe3b8280..a747e62690 100644 --- a/gen/fitness1/README.md +++ b/gen/fitness1/README.md @@ -106,16 +106,18 @@ let result = hub.users().data_sources_update(&req, "userId", "dataSourceId") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/fitness1/src/cmn.rs b/gen/fitness1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/fitness1/src/cmn.rs +++ b/gen/fitness1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/fitness1/src/lib.rs b/gen/fitness1/src/lib.rs index 27585e1429..c302949e8e 100644 --- a/gen/fitness1/src/lib.rs +++ b/gen/fitness1/src/lib.rs @@ -107,16 +107,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -300,16 +302,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -426,7 +430,7 @@ impl ResponseResult for Dataset {} /// /// * [data sources list users](struct.UserDataSourceListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListDataSourcesResponse { /// A previously created data source. #[serde(rename="dataSource")] @@ -503,7 +507,7 @@ impl ResponseResult for Session {} /// /// * [sessions list users](struct.UserSessionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListSessionsResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. #[serde(rename="nextPageToken")] @@ -1130,59 +1134,56 @@ impl<'a, C, A> UserDataSourceDatasetGetCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The data stream ID of the data source that created the dataset. + /// /// Sets the *data source id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The data stream ID of the data source that created the dataset. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourceDatasetGetCall<'a, C, A> { self._data_source_id = new_value.to_string(); self } + /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. pub fn dataset_id(mut self, new_value: &str) -> UserDataSourceDatasetGetCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The continuation token, which is used to page through large datasets. To get the next page of a dataset, set this parameter to the value of nextPageToken from the previous response. Each subsequent call will yield a partial dataset with data point end timestamps that are strictly smaller than those in the previous partial response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> UserDataSourceDatasetGetCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *limit* query property to the given value. - /// - /// /// If specified, no more than this many data points will be included in the dataset. If the there are more data points in the dataset, nextPageToken will be set in the dataset response. + /// + /// Sets the *limit* query property to the given value. pub fn limit(mut self, new_value: i32) -> UserDataSourceDatasetGetCall<'a, C, A> { self._limit = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserDataSourceDatasetGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1212,8 +1213,8 @@ impl<'a, C, A> UserDataSourceDatasetGetCall<'a, C, A> where C: BorrowMut UserDataSourceCreateCall<'a, C, A> where C: BorrowMut UserDataSourceCreateCall<'a, C, A> where C: BorrowMut UserDataSourceCreateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourceCreateCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserDataSourceCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1467,8 +1467,8 @@ impl<'a, C, A> UserDataSourceCreateCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetDeleteCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetDeleteCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetDeleteCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The data stream ID of the data source that created the dataset. + /// /// Sets the *data source id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The data stream ID of the data source that created the dataset. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourceDatasetDeleteCall<'a, C, A> { self._data_source_id = new_value.to_string(); self } + /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. pub fn dataset_id(mut self, new_value: &str) -> UserDataSourceDatasetDeleteCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *modified time millis* query property to the given value. - /// - /// /// When the operation was performed on the client. + /// + /// Sets the *modified time millis* query property to the given value. pub fn modified_time_millis(mut self, new_value: &str) -> UserDataSourceDatasetDeleteCall<'a, C, A> { self._modified_time_millis = Some(new_value.to_string()); self } - /// Sets the *current time millis* query property to the given value. - /// - /// /// The client's current time in milliseconds since epoch. + /// + /// Sets the *current time millis* query property to the given value. pub fn current_time_millis(mut self, new_value: &str) -> UserDataSourceDatasetDeleteCall<'a, C, A> { self._current_time_millis = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserDataSourceDatasetDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1737,8 +1734,8 @@ impl<'a, C, A> UserDataSourceDatasetDeleteCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetPatchCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetPatchCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourceDatasetPatchCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The data stream ID of the data source that created the dataset. + /// /// Sets the *data source id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The data stream ID of the data source that created the dataset. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourceDatasetPatchCall<'a, C, A> { self._data_source_id = new_value.to_string(); self } + /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. pub fn dataset_id(mut self, new_value: &str) -> UserDataSourceDatasetPatchCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *current time millis* query property to the given value. - /// - /// /// The client's current time in milliseconds since epoch. Note that the minStartTimeNs and maxEndTimeNs properties in the request body are in nanoseconds instead of milliseconds. + /// + /// Sets the *current time millis* query property to the given value. pub fn current_time_millis(mut self, new_value: &str) -> UserDataSourceDatasetPatchCall<'a, C, A> { self._current_time_millis = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserDataSourceDatasetPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2029,8 +2024,8 @@ impl<'a, C, A> UserDataSourceDatasetPatchCall<'a, C, A> where C: BorrowMut UserSessionDeleteCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/fitness/v1/users/{userId}/sessions/{sessionId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::ActivityRead.as_ref().to_string(), ()); + self._scopes.insert(Scope::ActivityWrite.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userId}", "userId"), ("{sessionId}", "sessionId")].iter() { @@ -2210,41 +2205,39 @@ impl<'a, C, A> UserSessionDeleteCall<'a, C, A> where C: BorrowMut } + /// Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserSessionDeleteCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the session to be deleted. + /// /// Sets the *session id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the session to be deleted. pub fn session_id(mut self, new_value: &str) -> UserSessionDeleteCall<'a, C, A> { self._session_id = new_value.to_string(); self } - /// Sets the *current time millis* query property to the given value. - /// - /// /// The client's current time in milliseconds since epoch. + /// + /// Sets the *current time millis* query property to the given value. pub fn current_time_millis(mut self, new_value: &str) -> UserSessionDeleteCall<'a, C, A> { self._current_time_millis = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserSessionDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2274,8 +2267,8 @@ impl<'a, C, A> UserSessionDeleteCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ActivityWrite`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2461,33 +2454,32 @@ impl<'a, C, A> UserDataSourceGetCall<'a, C, A> where C: BorrowMut } + /// Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourceGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The data stream ID of the data source to retrieve. + /// /// Sets the *data source id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The data stream ID of the data source to retrieve. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourceGetCall<'a, C, A> { self._data_source_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserDataSourceGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2517,8 +2509,8 @@ impl<'a, C, A> UserDataSourceGetCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ActivityRead`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2617,7 +2609,7 @@ impl<'a, C, A> UserDataSourceUpdateCall<'a, C, A> where C: BorrowMut UserDataSourceUpdateCall<'a, C, A> where C: BorrowMut UserDataSourceUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourceUpdateCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The data stream ID of the data source to update. + /// /// Sets the *data source id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The data stream ID of the data source to update. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourceUpdateCall<'a, C, A> { self._data_source_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserDataSourceUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2786,8 +2777,8 @@ impl<'a, C, A> UserDataSourceUpdateCall<'a, C, A> where C: BorrowMut UserSessionListCall<'a, C, A> where C: BorrowMut, } + /// List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserSessionListCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// Sets the *start time* query property to the given value. - /// - /// /// An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. + /// + /// Sets the *start time* query property to the given value. pub fn start_time(mut self, new_value: &str) -> UserSessionListCall<'a, C, A> { self._start_time = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> UserSessionListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *include deleted* query property to the given value. - /// - /// /// If true, deleted sessions will be returned. When set to true, sessions returned in this response will only have an ID and will not have any other fields. + /// + /// Sets the *include deleted* query property to the given value. pub fn include_deleted(mut self, new_value: bool) -> UserSessionListCall<'a, C, A> { self._include_deleted = Some(new_value); self } - /// Sets the *end time* query property to the given value. - /// - /// /// An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. + /// + /// Sets the *end time* query property to the given value. pub fn end_time(mut self, new_value: &str) -> UserSessionListCall<'a, C, A> { self._end_time = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserSessionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3069,8 +3055,8 @@ impl<'a, C, A> UserSessionListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ActivityRead`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3172,7 +3158,7 @@ impl<'a, C, A> UserSessionUpdateCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/fitness/v1/users/{userId}/sessions/{sessionId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::ActivityRead.as_ref().to_string(), ()); + self._scopes.insert(Scope::ActivityWrite.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userId}", "userId"), ("{sessionId}", "sessionId")].iter() { @@ -3276,50 +3262,48 @@ impl<'a, C, A> UserSessionUpdateCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &Session) -> UserSessionUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserSessionUpdateCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the session to be created. + /// /// Sets the *session id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the session to be created. pub fn session_id(mut self, new_value: &str) -> UserSessionUpdateCall<'a, C, A> { self._session_id = new_value.to_string(); self } - /// Sets the *current time millis* query property to the given value. - /// - /// /// The client's current time in milliseconds since epoch. + /// + /// Sets the *current time millis* query property to the given value. pub fn current_time_millis(mut self, new_value: &str) -> UserSessionUpdateCall<'a, C, A> { self._current_time_millis = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserSessionUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3349,8 +3333,8 @@ impl<'a, C, A> UserSessionUpdateCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::ActivityWrite`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3449,7 +3433,7 @@ impl<'a, C, A> UserDataSourcePatchCall<'a, C, A> where C: BorrowMut UserDataSourcePatchCall<'a, C, A> where C: BorrowMut UserDataSourcePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// /// Sets the *user id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourcePatchCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The data stream ID of the data source to update. + /// /// Sets the *data source id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The data stream ID of the data source to update. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourcePatchCall<'a, C, A> { self._data_source_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserDataSourcePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3618,8 +3601,8 @@ impl<'a, C, A> UserDataSourcePatchCall<'a, C, A> where C: BorrowMut UserDataSourceListCall<'a, C, A> where C: BorrowMut UserDataSourceListCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The names of data types to include in the list. If not specified, all data sources will be returned. + /// /// Append the given value to the *data type name* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The names of data types to include in the list. If not specified, all data sources will be returned. pub fn add_data_type_name(mut self, new_value: &str) -> UserDataSourceListCall<'a, C, A> { self._data_type_name.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> UserDataSourceListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3867,8 +3848,8 @@ impl<'a, C, A> UserDataSourceListCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/freebase1/src/cmn.rs b/gen/freebase1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/freebase1/src/cmn.rs +++ b/gen/freebase1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/freebase1/src/lib.rs b/gen/freebase1/src/lib.rs index d5aab071ed..93c53559eb 100644 --- a/gen/freebase1/src/lib.rs +++ b/gen/freebase1/src/lib.rs @@ -108,16 +108,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -259,16 +261,18 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -314,7 +318,7 @@ impl<'a, C, A> Freebase /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReconcileCandidate { /// Language code that candidate and notable names are displayed in. pub lang: String, @@ -335,7 +339,7 @@ impl Part for ReconcileCandidate {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReconcileGetWarning { /// Code for identifying classes of warnings. pub reason: String, @@ -353,7 +357,7 @@ impl Part for ReconcileGetWarning {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReconcileGetCosts { /// Total number of hits found. pub hits: i32, @@ -374,7 +378,7 @@ impl Part for ReconcileGetCosts {} /// /// * [reconcile](struct.MethodReconcileCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReconcileGet { /// Server costs for reconciling. pub costs: ReconcileGetCosts, @@ -394,7 +398,7 @@ impl ResponseResult for ReconcileGet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReconcileCandidateNotable { /// MID of notable category. pub id: String, @@ -690,65 +694,58 @@ impl<'a, C, A> MethodReconcileCall<'a, C, A> where C: BorrowMut, } - /// Append the given value to the *prop* query property. - /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// /// Property values for entity formatted as /// : + /// + /// Append the given value to the *prop* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. pub fn add_prop(mut self, new_value: &str) -> MethodReconcileCall<'a, C, A> { self._prop.push(new_value.to_string()); self } - /// Sets the *name* query property to the given value. - /// - /// /// Name of entity. + /// + /// Sets the *name* query property to the given value. pub fn name(mut self, new_value: &str) -> MethodReconcileCall<'a, C, A> { self._name = Some(new_value.to_string()); self } - /// Sets the *limit* query property to the given value. - /// - /// /// Maximum number of candidates to return. + /// + /// Sets the *limit* query property to the given value. pub fn limit(mut self, new_value: i32) -> MethodReconcileCall<'a, C, A> { self._limit = Some(new_value); self } + /// Languages for names and values. First language is used for display. Default is 'en'. + /// /// Append the given value to the *lang* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Languages for names and values. First language is used for display. Default is 'en'. pub fn add_lang(mut self, new_value: &str) -> MethodReconcileCall<'a, C, A> { self._lang.push(new_value.to_string()); self } + /// Classifications of entity e.g. type, category, title. + /// /// Append the given value to the *kind* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Classifications of entity e.g. type, category, title. pub fn add_kind(mut self, new_value: &str) -> MethodReconcileCall<'a, C, A> { self._kind.push(new_value.to_string()); self } - /// Sets the *confidence* query property to the given value. - /// - /// /// Required confidence for a candidate to match. Must be between .5 and 1.0 + /// + /// Sets the *confidence* query property to the given value. pub fn confidence(mut self, new_value: f32) -> MethodReconcileCall<'a, C, A> { self._confidence = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MethodReconcileCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1053,204 +1050,180 @@ impl<'a, C, A> MethodSearchCall<'a, C, A> where C: BorrowMut, A: } + /// A rule to not match against. + /// /// Append the given value to the *without* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A rule to not match against. pub fn add_without(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._without.push(new_value.to_string()); self } + /// A rule to match against. + /// /// Append the given value to the *with* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A rule to match against. pub fn add_with(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._with.push(new_value.to_string()); self } + /// Restrict to topics with this Freebase type id. + /// /// Append the given value to the *type* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Restrict to topics with this Freebase type id. pub fn add_type(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._type_.push(new_value.to_string()); self } - /// Sets the *stemmed* query property to the given value. - /// - /// /// Query on stemmed names and aliases. May not be used with prefixed. + /// + /// Sets the *stemmed* query property to the given value. pub fn stemmed(mut self, new_value: bool) -> MethodSearchCall<'a, C, A> { self._stemmed = Some(new_value); self } - /// Sets the *spell* query property to the given value. - /// - /// /// Request 'did you mean' suggestions + /// + /// Sets the *spell* query property to the given value. pub fn spell(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._spell = Some(new_value.to_string()); self } - /// Sets the *scoring* query property to the given value. - /// - /// /// Relevance scoring algorithm to use. + /// + /// Sets the *scoring* query property to the given value. pub fn scoring(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._scoring = Some(new_value.to_string()); self } - /// Sets the *query* query property to the given value. - /// - /// /// Query term to search for. + /// + /// Sets the *query* query property to the given value. pub fn query(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._query = Some(new_value.to_string()); self } - /// Sets the *prefixed* query property to the given value. - /// - /// /// Prefix match against names and aliases. + /// + /// Sets the *prefixed* query property to the given value. pub fn prefixed(mut self, new_value: bool) -> MethodSearchCall<'a, C, A> { self._prefixed = Some(new_value); self } - /// Sets the *output* query property to the given value. - /// - /// /// An output expression to request data from matches. + /// + /// Sets the *output* query property to the given value. pub fn output(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._output = Some(new_value.to_string()); self } - /// Sets the *mql_output* query property to the given value. - /// - /// /// The MQL query to run againist the results to extract more data. + /// + /// Sets the *mql_output* query property to the given value. pub fn mql_output(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._mql_output = Some(new_value.to_string()); self } + /// A mid to use instead of a query. + /// /// Append the given value to the *mid* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A mid to use instead of a query. pub fn add_mid(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._mid.push(new_value.to_string()); self } - /// Sets the *limit* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *limit* query property to the given value. pub fn limit(mut self, new_value: i32) -> MethodSearchCall<'a, C, A> { self._limit = Some(new_value); self } + /// The code of the language to run the query with. Default is 'en'. + /// /// Append the given value to the *lang* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The code of the language to run the query with. Default is 'en'. pub fn add_lang(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._lang.push(new_value.to_string()); self } - /// Sets the *indent* query property to the given value. - /// - /// /// Whether to indent the json results or not. + /// + /// Sets the *indent* query property to the given value. pub fn indent(mut self, new_value: bool) -> MethodSearchCall<'a, C, A> { self._indent = Some(new_value); self } - /// Sets the *help* query property to the given value. - /// - /// /// The keyword to request help on. + /// + /// Sets the *help* query property to the given value. pub fn help(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._help = Some(new_value.to_string()); self } - /// Sets the *format* query property to the given value. - /// - /// /// Structural format of the json response. + /// + /// Sets the *format* query property to the given value. pub fn format(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._format = Some(new_value.to_string()); self } + /// A filter to apply to the query. + /// /// Append the given value to the *filter* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A filter to apply to the query. pub fn add_filter(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._filter.push(new_value.to_string()); self } - /// Sets the *exact* query property to the given value. - /// - /// /// Query on exact name and keys only. + /// + /// Sets the *exact* query property to the given value. pub fn exact(mut self, new_value: bool) -> MethodSearchCall<'a, C, A> { self._exact = Some(new_value); self } - /// Sets the *encode* query property to the given value. - /// - /// /// The encoding of the response. You can use this parameter to enable html encoding. + /// + /// Sets the *encode* query property to the given value. pub fn encode(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._encode = Some(new_value.to_string()); self } + /// Restrict to topics with this Freebase domain id. + /// /// Append the given value to the *domain* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Restrict to topics with this Freebase domain id. pub fn add_domain(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._domain.push(new_value.to_string()); self } - /// Sets the *cursor* query property to the given value. - /// - /// /// The cursor value to use for the next page of results. + /// + /// Sets the *cursor* query property to the given value. pub fn cursor(mut self, new_value: i32) -> MethodSearchCall<'a, C, A> { self._cursor = Some(new_value); self } - /// Sets the *callback* query property to the given value. - /// - /// /// JS method name for JSONP callbacks. + /// + /// Sets the *callback* query property to the given value. pub fn callback(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._callback = Some(new_value.to_string()); self } - /// Sets the *as_of_time* query property to the given value. - /// - /// /// A mql as_of_time value to use with mql_output queries. + /// + /// Sets the *as_of_time* query property to the given value. pub fn as_of_time(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._as_of_time = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MethodSearchCall<'a, C, A> { self._delegate = Some(new_value); self diff --git a/gen/freebase1_sandbox/README.md b/gen/freebase1_sandbox/README.md index 0ba07d656e..ab694bf09b 100644 --- a/gen/freebase1_sandbox/README.md +++ b/gen/freebase1_sandbox/README.md @@ -107,16 +107,18 @@ let result = hub.methods().reconcile() match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/freebase1_sandbox/src/cmn.rs b/gen/freebase1_sandbox/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/freebase1_sandbox/src/cmn.rs +++ b/gen/freebase1_sandbox/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/freebase1_sandbox/src/lib.rs b/gen/freebase1_sandbox/src/lib.rs index 1b48cfa448..3fc99143ad 100644 --- a/gen/freebase1_sandbox/src/lib.rs +++ b/gen/freebase1_sandbox/src/lib.rs @@ -108,16 +108,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -259,16 +261,18 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -314,7 +318,7 @@ impl<'a, C, A> Freebase /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReconcileCandidate { /// Language code that candidate and notable names are displayed in. pub lang: String, @@ -335,7 +339,7 @@ impl Part for ReconcileCandidate {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReconcileGetWarning { /// Code for identifying classes of warnings. pub reason: String, @@ -353,7 +357,7 @@ impl Part for ReconcileGetWarning {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReconcileGetCosts { /// Total number of hits found. pub hits: i32, @@ -374,7 +378,7 @@ impl Part for ReconcileGetCosts {} /// /// * [reconcile](struct.MethodReconcileCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReconcileGet { /// Server costs for reconciling. pub costs: ReconcileGetCosts, @@ -394,7 +398,7 @@ impl ResponseResult for ReconcileGet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReconcileCandidateNotable { /// MID of notable category. pub id: String, @@ -690,65 +694,58 @@ impl<'a, C, A> MethodReconcileCall<'a, C, A> where C: BorrowMut, } - /// Append the given value to the *prop* query property. - /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// /// Property values for entity formatted as /// : + /// + /// Append the given value to the *prop* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. pub fn add_prop(mut self, new_value: &str) -> MethodReconcileCall<'a, C, A> { self._prop.push(new_value.to_string()); self } - /// Sets the *name* query property to the given value. - /// - /// /// Name of entity. + /// + /// Sets the *name* query property to the given value. pub fn name(mut self, new_value: &str) -> MethodReconcileCall<'a, C, A> { self._name = Some(new_value.to_string()); self } - /// Sets the *limit* query property to the given value. - /// - /// /// Maximum number of candidates to return. + /// + /// Sets the *limit* query property to the given value. pub fn limit(mut self, new_value: i32) -> MethodReconcileCall<'a, C, A> { self._limit = Some(new_value); self } + /// Languages for names and values. First language is used for display. Default is 'en'. + /// /// Append the given value to the *lang* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Languages for names and values. First language is used for display. Default is 'en'. pub fn add_lang(mut self, new_value: &str) -> MethodReconcileCall<'a, C, A> { self._lang.push(new_value.to_string()); self } + /// Classifications of entity e.g. type, category, title. + /// /// Append the given value to the *kind* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Classifications of entity e.g. type, category, title. pub fn add_kind(mut self, new_value: &str) -> MethodReconcileCall<'a, C, A> { self._kind.push(new_value.to_string()); self } - /// Sets the *confidence* query property to the given value. - /// - /// /// Required confidence for a candidate to match. Must be between .5 and 1.0 + /// + /// Sets the *confidence* query property to the given value. pub fn confidence(mut self, new_value: f32) -> MethodReconcileCall<'a, C, A> { self._confidence = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MethodReconcileCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1053,204 +1050,180 @@ impl<'a, C, A> MethodSearchCall<'a, C, A> where C: BorrowMut, A: } + /// A rule to not match against. + /// /// Append the given value to the *without* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A rule to not match against. pub fn add_without(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._without.push(new_value.to_string()); self } + /// A rule to match against. + /// /// Append the given value to the *with* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A rule to match against. pub fn add_with(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._with.push(new_value.to_string()); self } + /// Restrict to topics with this Freebase type id. + /// /// Append the given value to the *type* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Restrict to topics with this Freebase type id. pub fn add_type(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._type_.push(new_value.to_string()); self } - /// Sets the *stemmed* query property to the given value. - /// - /// /// Query on stemmed names and aliases. May not be used with prefixed. + /// + /// Sets the *stemmed* query property to the given value. pub fn stemmed(mut self, new_value: bool) -> MethodSearchCall<'a, C, A> { self._stemmed = Some(new_value); self } - /// Sets the *spell* query property to the given value. - /// - /// /// Request 'did you mean' suggestions + /// + /// Sets the *spell* query property to the given value. pub fn spell(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._spell = Some(new_value.to_string()); self } - /// Sets the *scoring* query property to the given value. - /// - /// /// Relevance scoring algorithm to use. + /// + /// Sets the *scoring* query property to the given value. pub fn scoring(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._scoring = Some(new_value.to_string()); self } - /// Sets the *query* query property to the given value. - /// - /// /// Query term to search for. + /// + /// Sets the *query* query property to the given value. pub fn query(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._query = Some(new_value.to_string()); self } - /// Sets the *prefixed* query property to the given value. - /// - /// /// Prefix match against names and aliases. + /// + /// Sets the *prefixed* query property to the given value. pub fn prefixed(mut self, new_value: bool) -> MethodSearchCall<'a, C, A> { self._prefixed = Some(new_value); self } - /// Sets the *output* query property to the given value. - /// - /// /// An output expression to request data from matches. + /// + /// Sets the *output* query property to the given value. pub fn output(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._output = Some(new_value.to_string()); self } - /// Sets the *mql_output* query property to the given value. - /// - /// /// The MQL query to run againist the results to extract more data. + /// + /// Sets the *mql_output* query property to the given value. pub fn mql_output(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._mql_output = Some(new_value.to_string()); self } + /// A mid to use instead of a query. + /// /// Append the given value to the *mid* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A mid to use instead of a query. pub fn add_mid(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._mid.push(new_value.to_string()); self } - /// Sets the *limit* query property to the given value. - /// - /// /// Maximum number of results to return. + /// + /// Sets the *limit* query property to the given value. pub fn limit(mut self, new_value: i32) -> MethodSearchCall<'a, C, A> { self._limit = Some(new_value); self } + /// The code of the language to run the query with. Default is 'en'. + /// /// Append the given value to the *lang* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The code of the language to run the query with. Default is 'en'. pub fn add_lang(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._lang.push(new_value.to_string()); self } - /// Sets the *indent* query property to the given value. - /// - /// /// Whether to indent the json results or not. + /// + /// Sets the *indent* query property to the given value. pub fn indent(mut self, new_value: bool) -> MethodSearchCall<'a, C, A> { self._indent = Some(new_value); self } - /// Sets the *help* query property to the given value. - /// - /// /// The keyword to request help on. + /// + /// Sets the *help* query property to the given value. pub fn help(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._help = Some(new_value.to_string()); self } - /// Sets the *format* query property to the given value. - /// - /// /// Structural format of the json response. + /// + /// Sets the *format* query property to the given value. pub fn format(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._format = Some(new_value.to_string()); self } + /// A filter to apply to the query. + /// /// Append the given value to the *filter* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// A filter to apply to the query. pub fn add_filter(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._filter.push(new_value.to_string()); self } - /// Sets the *exact* query property to the given value. - /// - /// /// Query on exact name and keys only. + /// + /// Sets the *exact* query property to the given value. pub fn exact(mut self, new_value: bool) -> MethodSearchCall<'a, C, A> { self._exact = Some(new_value); self } - /// Sets the *encode* query property to the given value. - /// - /// /// The encoding of the response. You can use this parameter to enable html encoding. + /// + /// Sets the *encode* query property to the given value. pub fn encode(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._encode = Some(new_value.to_string()); self } + /// Restrict to topics with this Freebase domain id. + /// /// Append the given value to the *domain* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Restrict to topics with this Freebase domain id. pub fn add_domain(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._domain.push(new_value.to_string()); self } - /// Sets the *cursor* query property to the given value. - /// - /// /// The cursor value to use for the next page of results. + /// + /// Sets the *cursor* query property to the given value. pub fn cursor(mut self, new_value: i32) -> MethodSearchCall<'a, C, A> { self._cursor = Some(new_value); self } - /// Sets the *callback* query property to the given value. - /// - /// /// JS method name for JSONP callbacks. + /// + /// Sets the *callback* query property to the given value. pub fn callback(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._callback = Some(new_value.to_string()); self } - /// Sets the *as_of_time* query property to the given value. - /// - /// /// A mql as_of_time value to use with mql_output queries. + /// + /// Sets the *as_of_time* query property to the given value. pub fn as_of_time(mut self, new_value: &str) -> MethodSearchCall<'a, C, A> { self._as_of_time = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MethodSearchCall<'a, C, A> { self._delegate = Some(new_value); self diff --git a/gen/fusiontables2/README.md b/gen/fusiontables2/README.md index 9ebfac2d4e..c5a0daa9a0 100644 --- a/gen/fusiontables2/README.md +++ b/gen/fusiontables2/README.md @@ -126,16 +126,18 @@ let result = hub.table().import_table("name") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/fusiontables2/src/cmn.rs b/gen/fusiontables2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/fusiontables2/src/cmn.rs +++ b/gen/fusiontables2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/fusiontables2/src/lib.rs b/gen/fusiontables2/src/lib.rs index 2fc1fdda65..ea65d9a0fd 100644 --- a/gen/fusiontables2/src/lib.rs +++ b/gen/fusiontables2/src/lib.rs @@ -127,16 +127,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -301,16 +303,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -377,7 +381,7 @@ impl<'a, C, A> Fusiontables /// * [get task](struct.TaskGetCall.html) (response) /// * [replace rows table](struct.TableReplaceRowCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Task { /// false while the table is busy with some other task. true if this background task is currently running. pub started: bool, @@ -504,7 +508,7 @@ impl Part for StyleFunction {} /// /// * [list task](struct.TaskListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TaskList { /// Token used to access the next page of this result. No token is displayed if there are no more pages left. #[serde(rename="nextPageToken")] @@ -601,7 +605,7 @@ impl Part for ColumnBaseColumn {} /// /// * [list column](struct.ColumnListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ColumnList { /// Token used to access the next page of this result. No token is displayed if there are no more pages left. #[serde(rename="nextPageToken")] @@ -627,7 +631,7 @@ impl ResponseResult for ColumnList {} /// /// * [import rows table](struct.TableImportRowCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Import { /// The number of rows received from the import request. #[serde(rename="numRowsReceived")] @@ -709,7 +713,7 @@ impl Part for PolygonStyle {} /// /// * [list style](struct.StyleListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct StyleSettingList { /// Token used to access the next page of this result. No token is displayed if there are no more styles left. #[serde(rename="nextPageToken")] @@ -736,7 +740,7 @@ impl ResponseResult for StyleSettingList {} /// * [sql get query](struct.QuerySqlGetCall.html) (response) /// * [sql query](struct.QuerySqlCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Sqlresponse { /// The kind of item this is. For responses to SQL queries, this is always fusiontables#sqlresponse. pub kind: String, @@ -814,7 +818,7 @@ impl ResponseResult for StyleSetting {} /// /// * [list table](struct.TableListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TableList { /// Token used to access the next page of this result. No token is displayed if there are no more pages left. #[serde(rename="nextPageToken")] @@ -837,7 +841,7 @@ impl ResponseResult for TableList {} /// /// * [list template](struct.TemplateListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TemplateList { /// Token used to access the next page of this result. No token is displayed if there are no more pages left. #[serde(rename="nextPageToken")] @@ -2016,39 +2020,36 @@ impl<'a, C, A> StyleListCall<'a, C, A> where C: BorrowMut, A: oau } + /// Table whose styles are being listed + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table whose styles are being listed pub fn table_id(mut self, new_value: &str) -> StyleListCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token specifying which result page to return. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> StyleListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of styles to return. Optional. Default is 5. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> StyleListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StyleListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2078,8 +2079,8 @@ impl<'a, C, A> StyleListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2280,42 +2281,41 @@ impl<'a, C, A> StyleUpdateCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &StyleSetting) -> StyleUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Table whose style is being updated. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table whose style is being updated. pub fn table_id(mut self, new_value: &str) -> StyleUpdateCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Identifier (within a table) for the style being updated. + /// /// Sets the *style id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifier (within a table) for the style being updated. pub fn style_id(mut self, new_value: i32) -> StyleUpdateCall<'a, C, A> { self._style_id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StyleUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2345,8 +2345,8 @@ impl<'a, C, A> StyleUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2545,32 +2545,31 @@ impl<'a, C, A> StyleInsertCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &StyleSetting) -> StyleInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Table for which a new style is being added + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table for which a new style is being added pub fn table_id(mut self, new_value: &str) -> StyleInsertCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StyleInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2600,8 +2599,8 @@ impl<'a, C, A> StyleInsertCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2787,33 +2786,32 @@ impl<'a, C, A> StyleGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Table to which the requested style belongs + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table to which the requested style belongs pub fn table_id(mut self, new_value: &str) -> StyleGetCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Identifier (integer) for a specific style in a table + /// /// Sets the *style id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifier (integer) for a specific style in a table pub fn style_id(mut self, new_value: i32) -> StyleGetCall<'a, C, A> { self._style_id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StyleGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2843,8 +2841,8 @@ impl<'a, C, A> StyleGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3019,33 +3017,32 @@ impl<'a, C, A> StyleDeleteCall<'a, C, A> where C: BorrowMut, A: o } + /// Table from which the style is being deleted + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table from which the style is being deleted pub fn table_id(mut self, new_value: &str) -> StyleDeleteCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Identifier (within a table) for the style being deleted + /// /// Sets the *style id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifier (within a table) for the style being deleted pub fn style_id(mut self, new_value: i32) -> StyleDeleteCall<'a, C, A> { self._style_id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StyleDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3075,8 +3072,8 @@ impl<'a, C, A> StyleDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3277,42 +3274,41 @@ impl<'a, C, A> StylePatchCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &StyleSetting) -> StylePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Table whose style is being updated. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table whose style is being updated. pub fn table_id(mut self, new_value: &str) -> StylePatchCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Identifier (within a table) for the style being updated. + /// /// Sets the *style id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifier (within a table) for the style being updated. pub fn style_id(mut self, new_value: i32) -> StylePatchCall<'a, C, A> { self._style_id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StylePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3342,8 +3338,8 @@ impl<'a, C, A> StylePatchCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3542,47 +3538,43 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Table whose tasks are being listed. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table whose tasks are being listed. pub fn table_id(mut self, new_value: &str) -> TaskListCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Index of the first result returned in the current page. + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: u32) -> TaskListCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token specifying which result page to return. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TaskListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of tasks to return. Default is 5. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TaskListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TaskListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3612,8 +3604,8 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3788,33 +3780,32 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa } + /// Table from which the task is being deleted. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table from which the task is being deleted. pub fn table_id(mut self, new_value: &str) -> TaskDeleteCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// The identifier of the task to delete. + /// /// Sets the *task id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The identifier of the task to delete. pub fn task_id(mut self, new_value: &str) -> TaskDeleteCall<'a, C, A> { self._task_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TaskDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3844,8 +3835,8 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4031,33 +4022,32 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// Table to which the task belongs. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table to which the task belongs. pub fn table_id(mut self, new_value: &str) -> TaskGetCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// The identifier of the task to get. + /// /// Sets the *task id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The identifier of the task to get. pub fn task_id(mut self, new_value: &str) -> TaskGetCall<'a, C, A> { self._task_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TaskGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4087,8 +4077,8 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4287,32 +4277,31 @@ impl<'a, C, A> ColumnInsertCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Column) -> ColumnInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Table for which a new column is being added. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table for which a new column is being added. pub fn table_id(mut self, new_value: &str) -> ColumnInsertCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ColumnInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4342,8 +4331,8 @@ impl<'a, C, A> ColumnInsertCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4544,42 +4533,41 @@ impl<'a, C, A> ColumnUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Column) -> ColumnUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Table for which the column is being updated. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table for which the column is being updated. pub fn table_id(mut self, new_value: &str) -> ColumnUpdateCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Name or identifier for the column that is being updated. + /// /// Sets the *column id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name or identifier for the column that is being updated. pub fn column_id(mut self, new_value: &str) -> ColumnUpdateCall<'a, C, A> { self._column_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ColumnUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4609,8 +4597,8 @@ impl<'a, C, A> ColumnUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4804,39 +4792,36 @@ impl<'a, C, A> ColumnListCall<'a, C, A> where C: BorrowMut, A: oa } + /// Table whose columns are being listed. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table whose columns are being listed. pub fn table_id(mut self, new_value: &str) -> ColumnListCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token specifying which result page to return. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ColumnListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of columns to return. Default is 5. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ColumnListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ColumnListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4866,8 +4851,8 @@ impl<'a, C, A> ColumnListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5068,42 +5053,41 @@ impl<'a, C, A> ColumnPatchCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Column) -> ColumnPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Table for which the column is being updated. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table for which the column is being updated. pub fn table_id(mut self, new_value: &str) -> ColumnPatchCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Name or identifier for the column that is being updated. + /// /// Sets the *column id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name or identifier for the column that is being updated. pub fn column_id(mut self, new_value: &str) -> ColumnPatchCall<'a, C, A> { self._column_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ColumnPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5133,8 +5117,8 @@ impl<'a, C, A> ColumnPatchCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5309,33 +5293,32 @@ impl<'a, C, A> ColumnDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// Table from which the column is being deleted. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table from which the column is being deleted. pub fn table_id(mut self, new_value: &str) -> ColumnDeleteCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Name or identifier for the column being deleted. + /// /// Sets the *column id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name or identifier for the column being deleted. pub fn column_id(mut self, new_value: &str) -> ColumnDeleteCall<'a, C, A> { self._column_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ColumnDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5365,8 +5348,8 @@ impl<'a, C, A> ColumnDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5552,33 +5535,32 @@ impl<'a, C, A> ColumnGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// Table to which the column belongs. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table to which the column belongs. pub fn table_id(mut self, new_value: &str) -> ColumnGetCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Name or identifier for the column that is being requested. + /// /// Sets the *column id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Name or identifier for the column that is being requested. pub fn column_id(mut self, new_value: &str) -> ColumnGetCall<'a, C, A> { self._column_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ColumnGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5608,8 +5590,8 @@ impl<'a, C, A> ColumnGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5810,42 +5792,41 @@ impl<'a, C, A> TemplateUpdateCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Template) -> TemplateUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// Table to which the updated template belongs + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table to which the updated template belongs pub fn table_id(mut self, new_value: &str) -> TemplateUpdateCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Identifier for the template that is being updated + /// /// Sets the *template id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifier for the template that is being updated pub fn template_id(mut self, new_value: i32) -> TemplateUpdateCall<'a, C, A> { self._template_id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TemplateUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5875,8 +5856,8 @@ impl<'a, C, A> TemplateUpdateCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6070,39 +6051,36 @@ impl<'a, C, A> TemplateListCall<'a, C, A> where C: BorrowMut, A: } + /// Identifier for the table whose templates are being requested + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifier for the table whose templates are being requested pub fn table_id(mut self, new_value: &str) -> TemplateListCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token specifying which results page to return. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TemplateListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of templates to return. Optional. Default is 5. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TemplateListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TemplateListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6132,8 +6110,8 @@ impl<'a, C, A> TemplateListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6308,33 +6286,32 @@ impl<'a, C, A> TemplateDeleteCall<'a, C, A> where C: BorrowMut, A } + /// Table from which the template is being deleted + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table from which the template is being deleted pub fn table_id(mut self, new_value: &str) -> TemplateDeleteCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Identifier for the template which is being deleted + /// /// Sets the *template id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifier for the template which is being deleted pub fn template_id(mut self, new_value: i32) -> TemplateDeleteCall<'a, C, A> { self._template_id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TemplateDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6364,8 +6341,8 @@ impl<'a, C, A> TemplateDeleteCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6564,32 +6541,31 @@ impl<'a, C, A> TemplateInsertCall<'a, C, A> where C: BorrowMut, A } + /// /// Sets the *request* property to the given value. /// /// 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: &Template) -> TemplateInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// Table for which a new template is being created + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table for which a new template is being created pub fn table_id(mut self, new_value: &str) -> TemplateInsertCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TemplateInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6619,8 +6595,8 @@ impl<'a, C, A> TemplateInsertCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6821,42 +6797,41 @@ impl<'a, C, A> TemplatePatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Template) -> TemplatePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// Table to which the updated template belongs + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table to which the updated template belongs pub fn table_id(mut self, new_value: &str) -> TemplatePatchCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Identifier for the template that is being updated + /// /// Sets the *template id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifier for the template that is being updated pub fn template_id(mut self, new_value: i32) -> TemplatePatchCall<'a, C, A> { self._template_id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TemplatePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6886,8 +6861,8 @@ impl<'a, C, A> TemplatePatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7073,33 +7048,32 @@ impl<'a, C, A> TemplateGetCall<'a, C, A> where C: BorrowMut, A: o } + /// Table to which the template belongs + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table to which the template belongs pub fn table_id(mut self, new_value: &str) -> TemplateGetCall<'a, C, A> { self._table_id = new_value.to_string(); self } + /// Identifier for the template that is being requested + /// /// Sets the *template id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifier for the template that is being requested pub fn template_id(mut self, new_value: i32) -> TemplateGetCall<'a, C, A> { self._template_id = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TemplateGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7129,8 +7103,8 @@ impl<'a, C, A> TemplateGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7324,42 +7298,39 @@ impl<'a, C, A> QuerySqlGetCall<'a, C, A> where C: BorrowMut, A: o } - /// Sets the *sql* query property to the given value. - /// - /// Even though the property as already been set when instantiating this call, - /// we provide this method for API completeness. - /// /// A SQL statement which can be any of /// - SELECT /// - SHOW /// - DESCRIBE + /// + /// Sets the *sql* query property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. pub fn sql(mut self, new_value: &str) -> QuerySqlGetCall<'a, C, A> { self._sql = new_value.to_string(); self } - /// Sets the *typed* query property to the given value. - /// - /// /// Whether typed values are returned in the (JSON) response: numbers for numeric values and parsed geometries for KML values. Default is true. + /// + /// Sets the *typed* query property to the given value. pub fn typed(mut self, new_value: bool) -> QuerySqlGetCall<'a, C, A> { self._typed = Some(new_value); self } - /// Sets the *hdrs* query property to the given value. - /// - /// /// Whether column names are included (in the first row). Default is true. + /// + /// Sets the *hdrs* query property to the given value. pub fn hdrs(mut self, new_value: bool) -> QuerySqlGetCall<'a, C, A> { self._hdrs = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QuerySqlGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7389,8 +7360,8 @@ impl<'a, C, A> QuerySqlGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7588,11 +7559,6 @@ impl<'a, C, A> QuerySqlCall<'a, C, A> where C: BorrowMut, A: oaut } - /// Sets the *sql* query property to the given value. - /// - /// Even though the property as already been set when instantiating this call, - /// we provide this method for API completeness. - /// /// A Fusion Tables SQL statement, which can be any of /// - SELECT /// - INSERT @@ -7601,33 +7567,35 @@ impl<'a, C, A> QuerySqlCall<'a, C, A> where C: BorrowMut, A: oaut /// - SHOW /// - DESCRIBE /// - CREATE + /// + /// Sets the *sql* query property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. pub fn sql(mut self, new_value: &str) -> QuerySqlCall<'a, C, A> { self._sql = new_value.to_string(); self } - /// Sets the *typed* query property to the given value. - /// - /// /// Whether typed values are returned in the (JSON) response: numbers for numeric values and parsed geometries for KML values. Default is true. + /// + /// Sets the *typed* query property to the given value. pub fn typed(mut self, new_value: bool) -> QuerySqlCall<'a, C, A> { self._typed = Some(new_value); self } - /// Sets the *hdrs* query property to the given value. - /// - /// /// Whether column names are included in the first row. Default is true. + /// + /// Sets the *hdrs* query property to the given value. pub fn hdrs(mut self, new_value: bool) -> QuerySqlCall<'a, C, A> { self._hdrs = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QuerySqlCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7657,8 +7625,8 @@ impl<'a, C, A> QuerySqlCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7862,40 +7830,38 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Table) -> TablePatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// ID of the table that is being updated. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the table that is being updated. pub fn table_id(mut self, new_value: &str) -> TablePatchCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *replace view definition* query property to the given value. - /// - /// /// Whether the view definition is also updated. The specified view definition replaces the existing one. Only a view can be updated with a new definition. + /// + /// Sets the *replace view definition* query property to the given value. pub fn replace_view_definition(mut self, new_value: bool) -> TablePatchCall<'a, C, A> { self._replace_view_definition = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TablePatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7925,8 +7891,8 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8245,63 +8211,57 @@ impl<'a, C, A> TableReplaceRowCall<'a, C, A> where C: BorrowMut, self.doit(resumeable_stream, mime_type, "resumable") } + /// Table whose rows will be replaced. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Table whose rows will be replaced. pub fn table_id(mut self, new_value: &str) -> TableReplaceRowCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *start line* query property to the given value. - /// - /// /// The index of the first line from which to start importing, inclusive. Default is 0. + /// + /// Sets the *start line* query property to the given value. pub fn start_line(mut self, new_value: i32) -> TableReplaceRowCall<'a, C, A> { self._start_line = Some(new_value); self } - /// Sets the *is strict* query property to the given value. - /// - /// /// Whether the imported CSV must have the same number of column values for each row. If true, throws an exception if the CSV does not have the same number of columns. If false, rows with fewer column values will be padded with empty values. Default is true. + /// + /// Sets the *is strict* query property to the given value. pub fn is_strict(mut self, new_value: bool) -> TableReplaceRowCall<'a, C, A> { self._is_strict = Some(new_value); self } - /// Sets the *end line* query property to the given value. - /// - /// /// The index of the line up to which data will be imported. Default is to import the entire file. If endLine is negative, it is an offset from the end of the file; the imported content will exclude the last endLine lines. + /// + /// Sets the *end line* query property to the given value. pub fn end_line(mut self, new_value: i32) -> TableReplaceRowCall<'a, C, A> { self._end_line = Some(new_value); self } - /// Sets the *encoding* query property to the given value. - /// - /// /// The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are unsure of the encoding. + /// + /// Sets the *encoding* query property to the given value. pub fn encoding(mut self, new_value: &str) -> TableReplaceRowCall<'a, C, A> { self._encoding = Some(new_value.to_string()); self } - /// Sets the *delimiter* query property to the given value. - /// - /// /// The delimiter used to separate cell values. This can only consist of a single character. Default is ,. + /// + /// Sets the *delimiter* query property to the given value. pub fn delimiter(mut self, new_value: &str) -> TableReplaceRowCall<'a, C, A> { self._delimiter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableReplaceRowCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8331,8 +8291,8 @@ impl<'a, C, A> TableReplaceRowCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8536,40 +8496,38 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Table) -> TableUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// ID of the table that is being updated. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the table that is being updated. pub fn table_id(mut self, new_value: &str) -> TableUpdateCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *replace view definition* query property to the given value. - /// - /// /// Whether the view definition is also updated. The specified view definition replaces the existing one. Only a view can be updated with a new definition. + /// + /// Sets the *replace view definition* query property to the given value. pub fn replace_view_definition(mut self, new_value: bool) -> TableUpdateCall<'a, C, A> { self._replace_view_definition = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8599,8 +8557,8 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8773,23 +8731,22 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o } + /// ID of the table to be deleted. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the table to be deleted. pub fn table_id(mut self, new_value: &str) -> TableDeleteCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8819,8 +8776,8 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8993,22 +8950,21 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &Table) -> TableInsertCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9038,8 +8994,8 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9223,23 +9179,22 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Identifier for the table being requested. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Identifier for the table being requested. pub fn table_id(mut self, new_value: &str) -> TableGetCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9269,8 +9224,8 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9438,29 +9393,26 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau } - /// Sets the *page token* query property to the given value. - /// - /// /// Continuation token specifying which result page to return. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> TableListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Maximum number of tables to return. Default is 5. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TableListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9490,8 +9442,8 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9810,63 +9762,57 @@ impl<'a, C, A> TableImportRowCall<'a, C, A> where C: BorrowMut, A self.doit(resumeable_stream, mime_type, "resumable") } + /// The table into which new rows are being imported. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The table into which new rows are being imported. pub fn table_id(mut self, new_value: &str) -> TableImportRowCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *start line* query property to the given value. - /// - /// /// The index of the first line from which to start importing, inclusive. Default is 0. + /// + /// Sets the *start line* query property to the given value. pub fn start_line(mut self, new_value: i32) -> TableImportRowCall<'a, C, A> { self._start_line = Some(new_value); self } - /// Sets the *is strict* query property to the given value. - /// - /// /// Whether the imported CSV must have the same number of values for each row. If false, rows with fewer values will be padded with empty values. Default is true. + /// + /// Sets the *is strict* query property to the given value. pub fn is_strict(mut self, new_value: bool) -> TableImportRowCall<'a, C, A> { self._is_strict = Some(new_value); self } - /// Sets the *end line* query property to the given value. - /// - /// /// The index of the line up to which data will be imported. Default is to import the entire file. If endLine is negative, it is an offset from the end of the file; the imported content will exclude the last endLine lines. + /// + /// Sets the *end line* query property to the given value. pub fn end_line(mut self, new_value: i32) -> TableImportRowCall<'a, C, A> { self._end_line = Some(new_value); self } - /// Sets the *encoding* query property to the given value. - /// - /// /// The encoding of the content. Default is UTF-8. Use auto-detect if you are unsure of the encoding. + /// + /// Sets the *encoding* query property to the given value. pub fn encoding(mut self, new_value: &str) -> TableImportRowCall<'a, C, A> { self._encoding = Some(new_value.to_string()); self } - /// Sets the *delimiter* query property to the given value. - /// - /// /// The delimiter used to separate cell values. This can only consist of a single character. Default is ,. + /// + /// Sets the *delimiter* query property to the given value. pub fn delimiter(mut self, new_value: &str) -> TableImportRowCall<'a, C, A> { self._delimiter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableImportRowCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9896,8 +9842,8 @@ impl<'a, C, A> TableImportRowCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10177,39 +10123,36 @@ impl<'a, C, A> TableImportTableCall<'a, C, A> where C: BorrowMut, self.doit(resumeable_stream, mime_type, "resumable") } + /// The name to be assigned to the new table. + /// /// Sets the *name* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The name to be assigned to the new table. pub fn name(mut self, new_value: &str) -> TableImportTableCall<'a, C, A> { self._name = new_value.to_string(); self } - /// Sets the *encoding* query property to the given value. - /// - /// /// The encoding of the content. Default is UTF-8. Use auto-detect if you are unsure of the encoding. + /// + /// Sets the *encoding* query property to the given value. pub fn encoding(mut self, new_value: &str) -> TableImportTableCall<'a, C, A> { self._encoding = Some(new_value.to_string()); self } - /// Sets the *delimiter* query property to the given value. - /// - /// /// The delimiter used to separate cell values. This can only consist of a single character. Default is ,. + /// + /// Sets the *delimiter* query property to the given value. pub fn delimiter(mut self, new_value: &str) -> TableImportTableCall<'a, C, A> { self._delimiter = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableImportTableCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10239,8 +10182,8 @@ impl<'a, C, A> TableImportTableCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10429,31 +10372,29 @@ impl<'a, C, A> TableCopyCall<'a, C, A> where C: BorrowMut, A: oau } + /// ID of the table that is being copied. + /// /// Sets the *table id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// ID of the table that is being copied. pub fn table_id(mut self, new_value: &str) -> TableCopyCall<'a, C, A> { self._table_id = new_value.to_string(); self } - /// Sets the *copy presentation* query property to the given value. - /// - /// /// Whether to also copy tabs, styles, and templates. Default is false. + /// + /// Sets the *copy presentation* query property to the given value. pub fn copy_presentation(mut self, new_value: bool) -> TableCopyCall<'a, C, A> { self._copy_presentation = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TableCopyCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10483,8 +10424,8 @@ impl<'a, C, A> TableCopyCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. diff --git a/gen/games1/README.md b/gen/games1/README.md index 0926fecb92..97c837a6c1 100644 --- a/gen/games1/README.md +++ b/gen/games1/README.md @@ -134,16 +134,18 @@ let result = hub.turn_based_matches().leave_turn("matchId", -48) match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/games1/src/lib.rs b/gen/games1/src/lib.rs index 83a3ab6629..92b133b7a0 100644 --- a/gen/games1/src/lib.rs +++ b/gen/games1/src/lib.rs @@ -135,16 +135,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -312,16 +314,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -409,7 +413,7 @@ impl<'a, C, A> Games /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Category { /// The category name. pub category: String, @@ -432,7 +436,7 @@ impl Part for Category {} /// /// * [list players](struct.PlayerListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerListResponse { /// Token corresponding to the next page of results. #[serde(rename="nextPageToken")] @@ -450,7 +454,7 @@ impl ResponseResult for PlayerListResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerScore { /// Uniquely identifies the type of this resource. Value is always the fixed string games#playerScore. pub kind: String, @@ -478,7 +482,7 @@ impl Part for PlayerScore {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Instance { /// Uniquely identifies the type of this resource. Value is always the fixed string games#instance. pub kind: String, @@ -523,7 +527,7 @@ impl Part for Instance {} /// /// * [list achievement definitions](struct.AchievementDefinitionListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AchievementDefinition { /// The total steps for an incremental achievement. #[serde(rename="totalSteps")] @@ -581,7 +585,7 @@ impl Resource for AchievementDefinition {} /// /// * [unlock achievements](struct.AchievementUnlockCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AchievementUnlockResponse { /// Whether this achievement was newly unlocked (that is, whether the unlock request for the achievement was the first for the player). #[serde(rename="newlyUnlocked")] @@ -643,7 +647,7 @@ impl Part for EventUpdateRequest {} /// /// * [list turn based matches](struct.TurnBasedMatcheListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TurnBasedMatchList { /// The pagination token for the next page of results. #[serde(rename="nextPageToken")] @@ -666,7 +670,7 @@ impl ResponseResult for TurnBasedMatchList {} /// /// * [update multiple achievements](struct.AchievementUpdateMultipleCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AchievementUpdateMultipleResponse { /// Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateListResponse. pub kind: String, @@ -682,7 +686,7 @@ impl ResponseResult for AchievementUpdateMultipleResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventChild { /// Uniquely identifies the type of this resource. Value is always the fixed string games#eventChild. pub kind: String, @@ -698,7 +702,7 @@ impl Part for EventChild {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventRecordFailure { /// The ID of the event that was not updated. #[serde(rename="eventId")] @@ -720,7 +724,7 @@ impl Part for EventRecordFailure {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AchievementUpdateResponse { /// The current steps recorded for this achievement if it is incremental. #[serde(rename="currentSteps")] @@ -752,7 +756,7 @@ impl Part for AchievementUpdateResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RoomModification { /// Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. pub kind: String, @@ -776,7 +780,7 @@ impl Part for RoomModification {} /// /// * [list definitions events](struct.EventListDefinitionCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventDefinitionListResponse { /// The pagination token for the next page of results. #[serde(rename="nextPageToken")] @@ -799,7 +803,7 @@ impl ResponseResult for EventDefinitionListResponse {} /// /// * [submit scores](struct.ScoreSubmitCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerScoreResponse { /// Uniquely identifies the type of this resource. Value is always the fixed string games#playerScoreResponse. pub kind: String, @@ -831,7 +835,7 @@ impl ResponseResult for PlayerScoreResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImageAsset { /// The URL of the asset. pub url: String, @@ -877,7 +881,7 @@ impl RequestValue for RoomP2PStatuses {} /// /// * [increment achievements](struct.AchievementIncrementCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AchievementIncrementResponse { /// The current steps recorded for this incremental achievement. #[serde(rename="currentSteps")] @@ -901,7 +905,7 @@ impl ResponseResult for AchievementIncrementResponse {} /// /// * [sync turn based matches](struct.TurnBasedMatcheSyncCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TurnBasedMatchSync { /// The pagination token for the next page of results. #[serde(rename="nextPageToken")] @@ -957,7 +961,7 @@ impl RequestValue for TurnBasedMatchCreateRequest {} /// * [accept quests](struct.QuestAcceptCall.html) (response) /// * [list quests](struct.QuestListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Quest { /// The description of the quest. pub description: String, @@ -1045,7 +1049,7 @@ impl Part for AggregateStats {} /// /// * [set steps at least achievements](struct.AchievementSetStepsAtLeastCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AchievementSetStepsAtLeastResponse { /// The current steps recorded for this incremental achievement. #[serde(rename="currentSteps")] @@ -1069,7 +1073,7 @@ impl ResponseResult for AchievementSetStepsAtLeastResponse {} /// /// * [get metagame config metagame](struct.MetagameGetMetagameConfigCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MetagameConfig { /// Uniquely identifies the type of this resource. Value is always the fixed string games#metagameConfig. pub kind: String, @@ -1093,7 +1097,7 @@ impl ResponseResult for MetagameConfig {} /// /// * [list achievement definitions](struct.AchievementDefinitionListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AchievementDefinitionsListResponse { /// Token corresponding to the next page of results. #[serde(rename="nextPageToken")] @@ -1248,7 +1252,7 @@ impl RequestValue for PushTokenId {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventBatchRecordFailure { /// Uniquely identifies the type of this resource. Value is always the fixed string games#eventBatchRecordFailure. pub kind: String, @@ -1289,7 +1293,7 @@ impl Part for RoomClientAddress {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerExperienceInfo { /// The current number of experience points for the player. #[serde(rename="currentExperiencePoints")] @@ -1320,7 +1324,7 @@ impl Part for PlayerExperienceInfo {} /// * [list window scores](struct.ScoreListWindowCall.html) (response) /// * [list scores](struct.ScoreListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LeaderboardScores { /// The pagination token for the next page of results. #[serde(rename="nextPageToken")] @@ -1347,7 +1351,7 @@ impl ResponseResult for LeaderboardScores {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RoomParticipant { /// True if this participant was auto-matched with the requesting player. #[serde(rename="autoMatched")] @@ -1401,7 +1405,7 @@ impl Part for RoomParticipant {} /// * [list snapshots](struct.SnapshotListCall.html) (none) /// * [get snapshots](struct.SnapshotGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Snapshot { /// Uniquely identifies the type of this resource. Value is always the fixed string games#snapshot. pub kind: String, @@ -1486,7 +1490,7 @@ impl RequestValue for RoomLeaveRequest {} /// /// * [submit multiple scores](struct.ScoreSubmitMultipleCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerScoreListResponse { /// The score submissions statuses. #[serde(rename="submittedScores")] @@ -1541,7 +1545,7 @@ impl Part for RoomLeaveDiagnostics {} /// /// * [claim quest milestones](struct.QuestMilestoneClaimCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct QuestMilestone { /// The current state of the milestone. /// Possible values are: @@ -1573,7 +1577,7 @@ impl Resource for QuestMilestone {} /// /// * [rematch turn based matches](struct.TurnBasedMatcheRematchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TurnBasedMatchRematch { /// The newly created match; a rematch of the old match with the same participants. pub rematch: TurnBasedMatch, @@ -1596,7 +1600,7 @@ impl ResponseResult for TurnBasedMatchRematch {} /// /// * [get scores](struct.ScoreGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerLeaderboardScoreListResponse { /// The pagination token for the next page of results. #[serde(rename="nextPageToken")] @@ -1622,7 +1626,7 @@ impl ResponseResult for PlayerLeaderboardScoreListResponse {} /// * [get applications](struct.ApplicationGetCall.html) (response) /// * [played applications](struct.ApplicationPlayedCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Application { /// The category of the application. pub category: ApplicationCategory, @@ -1665,7 +1669,7 @@ impl ResponseResult for Application {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Played { /// True if the player was auto-matched with the currently authenticated user. #[serde(rename="autoMatched")] @@ -1684,7 +1688,7 @@ impl Part for Played {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct QuestContribution { /// The formatted value of the contribution as a string. Format depends on the configuration for the associated event definition in the Play Games Developer Console. #[serde(rename="formattedValue")] @@ -1702,7 +1706,7 @@ impl Part for QuestContribution {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct QuestCriterion { /// The ID of the event the criterion corresponds to. #[serde(rename="eventId")] @@ -1734,7 +1738,7 @@ impl Part for QuestCriterion {} /// /// * [list rooms](struct.RoomListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RoomList { /// The pagination token for the next page of results. #[serde(rename="nextPageToken")] @@ -1752,7 +1756,7 @@ impl ResponseResult for RoomList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerLevel { /// The maximum experience points for this level. #[serde(rename="maxExperiencePoints")] @@ -1773,7 +1777,7 @@ impl Part for PlayerLevel {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RoomAutoMatchStatus { /// Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus. pub kind: String, @@ -1789,7 +1793,7 @@ impl Part for RoomAutoMatchStatus {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TurnBasedMatchData { /// The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option. pub data: String, @@ -1807,7 +1811,7 @@ impl Part for TurnBasedMatchData {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventDefinition { /// Indicates whether the icon image being returned is a default image, or is game-provided. #[serde(rename="isDefaultImageUrl")] @@ -1841,7 +1845,7 @@ impl Part for EventDefinition {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstanceIosDetails { /// Indicates that this instance is the default for new installations on iPhone devices. #[serde(rename="preferredForIphone")] @@ -1872,7 +1876,7 @@ impl Part for InstanceIosDetails {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstanceAndroidDetails { /// Uniquely identifies the type of this resource. Value is always the fixed string games#instanceAndroidDetails. pub kind: String, @@ -1898,7 +1902,7 @@ impl Part for InstanceAndroidDetails {} /// /// * [reveal achievements](struct.AchievementRevealCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AchievementRevealResponse { /// Uniquely identifies the type of this resource. Value is always the fixed string games#achievementRevealResponse. pub kind: String, @@ -1929,7 +1933,7 @@ impl ResponseResult for AchievementRevealResponse {} /// * [join rooms](struct.RoomJoinCall.html) (response) /// * [report status rooms](struct.RoomReportStatuCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Room { /// The status of the room. /// Possible values are: @@ -1981,7 +1985,7 @@ impl ResponseResult for Room {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LeaderboardEntry { /// Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardEntry. pub kind: String, @@ -2085,7 +2089,7 @@ impl RequestValue for RoomCreateRequest {} /// /// * [list quests](struct.QuestListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct QuestListResponse { /// Token corresponding to the next page of results. #[serde(rename="nextPageToken")] @@ -2108,7 +2112,7 @@ impl ResponseResult for QuestListResponse {} /// /// * [list by player events](struct.EventListByPlayerCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerEventListResponse { /// The pagination token for the next page of results. #[serde(rename="nextPageToken")] @@ -2144,7 +2148,7 @@ impl Part for GamesAchievementIncrement {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TurnBasedMatchModification { /// Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification. pub kind: String, @@ -2168,7 +2172,7 @@ impl Part for TurnBasedMatchModification {} /// /// * [list achievements](struct.AchievementListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerAchievementListResponse { /// Token corresponding to the next page of results. #[serde(rename="nextPageToken")] @@ -2213,7 +2217,7 @@ impl Resource for PushToken {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerLeaderboardScore { /// The timestamp at which this score was recorded, in milliseconds since the epoch in UTC. #[serde(rename="writeTimestamp")] @@ -2273,7 +2277,7 @@ impl RequestValue for PlayerScoreSubmissionList {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SnapshotImage { /// The URL of the image. This URL may be invalidated at any time and should not be cached. pub url: String, @@ -2294,7 +2298,7 @@ impl Part for SnapshotImage {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AnonymousPlayer { /// Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer. pub kind: String, @@ -2378,7 +2382,7 @@ impl RequestValue for RoomJoinRequest {} /// /// * [report status rooms](struct.RoomReportStatuCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RoomStatus { /// The status of the room. /// Possible values are: @@ -2432,7 +2436,7 @@ impl Part for PushTokenIdIos {} /// * [list leaderboards](struct.LeaderboardListCall.html) (none) /// * [get leaderboards](struct.LeaderboardGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Leaderboard { /// The icon for the leaderboard. #[serde(rename="iconUrl")] @@ -2461,7 +2465,7 @@ impl ResponseResult for Leaderboard {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TurnBasedMatchParticipant { /// True if this participant was auto-matched with the requesting player. #[serde(rename="autoMatched")] @@ -2494,7 +2498,7 @@ impl Part for TurnBasedMatchParticipant {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LeaderboardScoreRank { /// The number of scores in the leaderboard. #[serde(rename="numScores")] @@ -2518,7 +2522,7 @@ impl Part for LeaderboardScoreRank {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerName { /// The given name of this player. In some places, this is known as the first name. #[serde(rename="givenName")] @@ -2536,7 +2540,7 @@ impl Part for PlayerName {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerAchievement { /// The state of the achievement. /// Possible values are: @@ -2648,7 +2652,7 @@ impl RequestValue for AchievementUpdateMultipleRequest {} /// /// * [list snapshots](struct.SnapshotListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SnapshotListResponse { /// Token corresponding to the next page of results. If there are no more results, the token is omitted. #[serde(rename="nextPageToken")] @@ -2666,7 +2670,7 @@ impl ResponseResult for SnapshotListResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ApplicationCategory { /// Uniquely identifies the type of this resource. Value is always the fixed string games#applicationCategory. pub kind: String, @@ -2771,7 +2775,7 @@ impl RequestValue for TurnBasedMatchTurn {} /// * [leave turn turn based matches](struct.TurnBasedMatcheLeaveTurnCall.html) (response) /// * [get turn based matches](struct.TurnBasedMatcheGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TurnBasedMatch { /// The status of the match. /// Possible values are: @@ -2874,7 +2878,7 @@ impl RequestValue for EventRecordRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstanceWebDetails { /// Uniquely identifies the type of this resource. Value is always the fixed string games#instanceWebDetails. pub kind: String, @@ -2897,7 +2901,7 @@ impl Part for InstanceWebDetails {} /// /// * [list categories by player metagame](struct.MetagameListCategoriesByPlayerCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CategoryListResponse { /// Token corresponding to the next page of results. #[serde(rename="nextPageToken")] @@ -2915,7 +2919,7 @@ impl ResponseResult for CategoryListResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerEvent { /// The ID of the event definition. #[serde(rename="definitionId")] @@ -2946,7 +2950,7 @@ impl Part for PlayerEvent {} /// * [list players](struct.PlayerListCall.html) (none) /// * [get players](struct.PlayerGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Player { /// Uniquely identifies the type of this resource. Value is always the fixed string games#player. pub kind: String, @@ -2984,7 +2988,7 @@ impl ResponseResult for Player {} /// /// * [record events](struct.EventRecordCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventUpdateResponse { /// The current status of any updated events #[serde(rename="playerEvents")] @@ -3011,7 +3015,7 @@ impl ResponseResult for EventUpdateResponse {} /// /// * [check revisions](struct.RevisionCheckCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RevisionCheckResponse { /// Uniquely identifies the type of this resource. Value is always the fixed string games#revisionCheckResponse. pub kind: String, @@ -3069,7 +3073,7 @@ impl Part for AchievementUpdateRequest {} /// /// * [list leaderboards](struct.LeaderboardListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LeaderboardListResponse { /// Token corresponding to the next page of results. #[serde(rename="nextPageToken")] @@ -4779,7 +4783,7 @@ impl<'a, C, A> AchievementListCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/games/v1/players/{playerId}/achievements".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{playerId}", "playerId")].iter() { @@ -4875,55 +4879,50 @@ impl<'a, C, A> AchievementListCall<'a, C, A> where C: BorrowMut, } + /// A player ID. A value of me may be used in place of the authenticated player's ID. + /// /// Sets the *player id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A player ID. A value of me may be used in place of the authenticated player's ID. pub fn player_id(mut self, new_value: &str) -> AchievementListCall<'a, C, A> { self._player_id = new_value.to_string(); self } - /// Sets the *state* query property to the given value. - /// - /// /// Tells the server to return only achievements with the specified state. If this parameter isn't specified, all achievements are returned. + /// + /// Sets the *state* query property to the given value. pub fn state(mut self, new_value: &str) -> AchievementListCall<'a, C, A> { self._state = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AchievementListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AchievementListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> AchievementListCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4953,8 +4952,8 @@ impl<'a, C, A> AchievementListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5049,7 +5048,7 @@ impl<'a, C, A> AchievementIncrementCall<'a, C, A> where C: BorrowMut AchievementIncrementCall<'a, C, A> where C: BorrowMut AchievementIncrementCall<'a, C, A> { self._achievement_id = new_value.to_string(); self } + /// The number of steps to increment. + /// /// Sets the *steps to increment* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The number of steps to increment. pub fn steps_to_increment(mut self, new_value: i32) -> AchievementIncrementCall<'a, C, A> { self._steps_to_increment = new_value; self } - /// Sets the *request id* query property to the given value. - /// - /// /// A randomly generated numeric ID for each request specified by the caller. This number is used at the server to ensure that the request is handled correctly across retries. + /// + /// Sets the *request id* query property to the given value. pub fn request_id(mut self, new_value: &str) -> AchievementIncrementCall<'a, C, A> { self._request_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementIncrementCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5209,8 +5206,8 @@ impl<'a, C, A> AchievementIncrementCall<'a, C, A> where C: BorrowMut AchievementSetStepsAtLeastCall<'a, C, A> where C: BorrowMut AchievementSetStepsAtLeastCall<'a, C, A> where C: BorrowMut AchievementSetStepsAtLeastCall<'a, C, A> { self._achievement_id = new_value.to_string(); self } + /// The minimum value to set the steps to. + /// /// Sets the *steps* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The minimum value to set the steps to. pub fn steps(mut self, new_value: i32) -> AchievementSetStepsAtLeastCall<'a, C, A> { self._steps = new_value; self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementSetStepsAtLeastCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5452,8 +5448,8 @@ impl<'a, C, A> AchievementSetStepsAtLeastCall<'a, C, A> where C: BorrowMut AchievementUpdateMultipleCall<'a, C, A> where C: BorrowMut AchievementUpdateMultipleCall<'a, C, A> where C: BorrowMut AchievementUpdateMultipleCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementUpdateMultipleCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5671,8 +5666,8 @@ impl<'a, C, A> AchievementUpdateMultipleCall<'a, C, A> where C: BorrowMut AchievementRevealCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/games/v1/achievements/{achievementId}/reveal".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{achievementId}", "achievementId")].iter() { @@ -5856,23 +5851,22 @@ impl<'a, C, A> AchievementRevealCall<'a, C, A> where C: BorrowMut } + /// The ID of the achievement used by this method. + /// /// Sets the *achievement id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the achievement used by this method. pub fn achievement_id(mut self, new_value: &str) -> AchievementRevealCall<'a, C, A> { self._achievement_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementRevealCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5902,8 +5896,8 @@ impl<'a, C, A> AchievementRevealCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5991,7 +5985,7 @@ impl<'a, C, A> AchievementUnlockCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/games/v1/achievements/{achievementId}/unlock".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{achievementId}", "achievementId")].iter() { @@ -6087,23 +6081,22 @@ impl<'a, C, A> AchievementUnlockCall<'a, C, A> where C: BorrowMut } + /// The ID of the achievement used by this method. + /// /// Sets the *achievement id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the achievement used by this method. pub fn achievement_id(mut self, new_value: &str) -> AchievementUnlockCall<'a, C, A> { self._achievement_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementUnlockCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6133,8 +6126,8 @@ impl<'a, C, A> AchievementUnlockCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6227,7 +6220,7 @@ impl<'a, C, A> LeaderboardGetCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/games/v1/leaderboards/{leaderboardId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{leaderboardId}", "leaderboardId")].iter() { @@ -6323,31 +6316,29 @@ impl<'a, C, A> LeaderboardGetCall<'a, C, A> where C: BorrowMut, A } + /// The ID of the leaderboard. + /// /// Sets the *leaderboard id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the leaderboard. pub fn leaderboard_id(mut self, new_value: &str) -> LeaderboardGetCall<'a, C, A> { self._leaderboard_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> LeaderboardGetCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LeaderboardGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6377,8 +6368,8 @@ impl<'a, C, A> LeaderboardGetCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6479,7 +6470,7 @@ impl<'a, C, A> LeaderboardListCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/games/v1/leaderboards".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6551,37 +6542,33 @@ impl<'a, C, A> LeaderboardListCall<'a, C, A> where C: BorrowMut, } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> LeaderboardListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of leaderboards to return in the response. For any response, the actual number of leaderboards returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> LeaderboardListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> LeaderboardListCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LeaderboardListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6611,8 +6598,8 @@ impl<'a, C, A> LeaderboardListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6717,7 +6704,7 @@ impl<'a, C, A> MetagameListCategoriesByPlayerCall<'a, C, A> where C: BorrowMut MetagameListCategoriesByPlayerCall<'a, C, A> where C: BorrowMut MetagameListCategoriesByPlayerCall<'a, C, A> { self._player_id = new_value.to_string(); self } + /// The collection of categories for which data will be returned. + /// /// Sets the *collection* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The collection of categories for which data will be returned. pub fn collection(mut self, new_value: &str) -> MetagameListCategoriesByPlayerCall<'a, C, A> { self._collection = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> MetagameListCategoriesByPlayerCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of category resources to return in the response, used for paging. For any response, the actual number of category resources returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> MetagameListCategoriesByPlayerCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> MetagameListCategoriesByPlayerCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> MetagameListCategoriesByPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6893,8 +6876,8 @@ impl<'a, C, A> MetagameListCategoriesByPlayerCall<'a, C, A> where C: BorrowMut MetagameGetMetagameConfigCall<'a, C, A> where C: BorrowMut MetagameGetMetagameConfigCall<'a, C, A> where C: BorrowMut MetagameGetMetagameConfigCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7088,8 +7070,8 @@ impl<'a, C, A> MetagameGetMetagameConfigCall<'a, C, A> where C: BorrowMut PlayerListCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/games/v1/players/me/players/{collection}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{collection}", "collection")].iter() { @@ -7288,47 +7270,43 @@ impl<'a, C, A> PlayerListCall<'a, C, A> where C: BorrowMut, A: oa } + /// Collection of players being retrieved + /// /// Sets the *collection* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Collection of players being retrieved pub fn collection(mut self, new_value: &str) -> PlayerListCall<'a, C, A> { self._collection = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> PlayerListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of player resources to return in the response, used for paging. For any response, the actual number of player resources returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> PlayerListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> PlayerListCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlayerListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7358,8 +7336,8 @@ impl<'a, C, A> PlayerListCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7452,7 +7430,7 @@ impl<'a, C, A> PlayerGetCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/games/v1/players/{playerId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{playerId}", "playerId")].iter() { @@ -7548,31 +7526,29 @@ impl<'a, C, A> PlayerGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// A player ID. A value of me may be used in place of the authenticated player's ID. + /// /// Sets the *player id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A player ID. A value of me may be used in place of the authenticated player's ID. pub fn player_id(mut self, new_value: &str) -> PlayerGetCall<'a, C, A> { self._player_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> PlayerGetCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlayerGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7602,8 +7578,8 @@ impl<'a, C, A> PlayerGetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7696,7 +7672,7 @@ impl<'a, C, A> QuestAcceptCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/games/v1/quests/{questId}/accept".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{questId}", "questId")].iter() { @@ -7792,31 +7768,29 @@ impl<'a, C, A> QuestAcceptCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the quest. + /// /// Sets the *quest id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the quest. pub fn quest_id(mut self, new_value: &str) -> QuestAcceptCall<'a, C, A> { self._quest_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> QuestAcceptCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QuestAcceptCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7846,8 +7820,8 @@ impl<'a, C, A> QuestAcceptCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7950,7 +7924,7 @@ impl<'a, C, A> QuestListCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/games/v1/players/{playerId}/quests".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{playerId}", "playerId")].iter() { @@ -8046,47 +8020,43 @@ impl<'a, C, A> QuestListCall<'a, C, A> where C: BorrowMut, A: oau } + /// A player ID. A value of me may be used in place of the authenticated player's ID. + /// /// Sets the *player id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A player ID. A value of me may be used in place of the authenticated player's ID. pub fn player_id(mut self, new_value: &str) -> QuestListCall<'a, C, A> { self._player_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> QuestListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of quest resources to return in the response, used for paging. For any response, the actual number of quest resources returned may be less than the specified maxResults. Acceptable values are 1 to 50, inclusive. (Default: 50). + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> QuestListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> QuestListCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QuestListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8116,8 +8086,8 @@ impl<'a, C, A> QuestListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8306,31 +8276,29 @@ impl<'a, C, A> SnapshotGetCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the snapshot. + /// /// Sets the *snapshot id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the snapshot. pub fn snapshot_id(mut self, new_value: &str) -> SnapshotGetCall<'a, C, A> { self._snapshot_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> SnapshotGetCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SnapshotGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8360,8 +8328,8 @@ impl<'a, C, A> SnapshotGetCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DriveAppdata`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8560,47 +8528,43 @@ impl<'a, C, A> SnapshotListCall<'a, C, A> where C: BorrowMut, A: } + /// A player ID. A value of me may be used in place of the authenticated player's ID. + /// /// Sets the *player id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A player ID. A value of me may be used in place of the authenticated player's ID. pub fn player_id(mut self, new_value: &str) -> SnapshotListCall<'a, C, A> { self._player_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> SnapshotListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of snapshot resources to return in the response, used for paging. For any response, the actual number of snapshot resources returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> SnapshotListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> SnapshotListCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> SnapshotListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8630,8 +8594,8 @@ impl<'a, C, A> SnapshotListCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DriveAppdata`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8718,7 +8682,7 @@ impl<'a, C, A> TurnBasedMatcheDismisCall<'a, C, A> where C: BorrowMut TurnBasedMatcheDismisCall<'a, C, A> where C: BorrowMut TurnBasedMatcheDismisCall<'a, C, A> { self._match_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheDismisCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8850,8 +8813,8 @@ impl<'a, C, A> TurnBasedMatcheDismisCall<'a, C, A> where C: BorrowMut TurnBasedMatcheSyncCall<'a, C, A> where C: BorrowMut TurnBasedMatcheSyncCall<'a, C, A> where C: BorrowMut TurnBasedMatcheSyncCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of matches to return in the response, used for paging. For any response, the actual number of matches to return may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> TurnBasedMatcheSyncCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *max completed matches* query property to the given value. - /// - /// /// The maximum number of completed or canceled matches to return in the response. If not set, all matches returned could be completed or canceled. + /// + /// Sets the *max completed matches* query property to the given value. pub fn max_completed_matches(mut self, new_value: i32) -> TurnBasedMatcheSyncCall<'a, C, A> { self._max_completed_matches = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> TurnBasedMatcheSyncCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *include match data* query property to the given value. - /// - /// /// True if match data should be returned in the response. Note that not all data will necessarily be returned if include_match_data is true; the server may decide to only return data for some of the matches to limit download size for the client. The remainder of the data for these matches will be retrievable on request. + /// + /// Sets the *include match data* query property to the given value. pub fn include_match_data(mut self, new_value: bool) -> TurnBasedMatcheSyncCall<'a, C, A> { self._include_match_data = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheSyncCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9110,8 +9067,8 @@ impl<'a, C, A> TurnBasedMatcheSyncCall<'a, C, A> where C: BorrowMut TurnBasedMatcheDeclineCall<'a, C, A> where C: BorrowMut TurnBasedMatcheDeclineCall<'a, C, A> where C: BorrowMut TurnBasedMatcheDeclineCall<'a, C, A> { self._match_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> TurnBasedMatcheDeclineCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheDeclineCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9354,8 +9309,8 @@ impl<'a, C, A> TurnBasedMatcheDeclineCall<'a, C, A> where C: BorrowMut TurnBasedMatcheGetCall<'a, C, A> where C: BorrowMut TurnBasedMatcheGetCall<'a, C, A> where C: BorrowMut TurnBasedMatcheGetCall<'a, C, A> { self._match_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> TurnBasedMatcheGetCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *include match data* query property to the given value. - /// - /// /// Get match data along with metadata. + /// + /// Sets the *include match data* query property to the given value. pub fn include_match_data(mut self, new_value: bool) -> TurnBasedMatcheGetCall<'a, C, A> { self._include_match_data = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9611,8 +9563,8 @@ impl<'a, C, A> TurnBasedMatcheGetCall<'a, C, A> where C: BorrowMut TurnBasedMatcheCreateCall<'a, C, A> where C: BorrowMut TurnBasedMatcheCreateCall<'a, C, A> where C: BorrowMut TurnBasedMatcheCreateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> TurnBasedMatcheCreateCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9843,8 +9793,8 @@ impl<'a, C, A> TurnBasedMatcheCreateCall<'a, C, A> where C: BorrowMut TurnBasedMatcheJoinCall<'a, C, A> where C: BorrowMut TurnBasedMatcheJoinCall<'a, C, A> where C: BorrowMut TurnBasedMatcheJoinCall<'a, C, A> { self._match_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> TurnBasedMatcheJoinCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheJoinCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10087,8 +10035,8 @@ impl<'a, C, A> TurnBasedMatcheJoinCall<'a, C, A> where C: BorrowMut TurnBasedMatcheLeaveTurnCall<'a, C, A> where C: BorrowMut TurnBasedMatcheLeaveTurnCall<'a, C, A> where C: BorrowMut TurnBasedMatcheLeaveTurnCall<'a, C, A> { self._match_id = new_value.to_string(); self } + /// The version of the match being updated. + /// /// Sets the *match version* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The version of the match being updated. pub fn match_version(mut self, new_value: i32) -> TurnBasedMatcheLeaveTurnCall<'a, C, A> { self._match_version = new_value; self } - /// Sets the *pending participant id* query property to the given value. - /// - /// /// The ID of another participant who should take their turn next. If not set, the match will wait for other player(s) to join via automatching; this is only valid if automatch criteria is set on the match with remaining slots for automatched players. + /// + /// Sets the *pending participant id* query property to the given value. pub fn pending_participant_id(mut self, new_value: &str) -> TurnBasedMatcheLeaveTurnCall<'a, C, A> { self._pending_participant_id = Some(new_value.to_string()); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> TurnBasedMatcheLeaveTurnCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheLeaveTurnCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10356,8 +10301,8 @@ impl<'a, C, A> TurnBasedMatcheLeaveTurnCall<'a, C, A> where C: BorrowMut TurnBasedMatcheCancelCall<'a, C, A> where C: BorrowMut TurnBasedMatcheCancelCall<'a, C, A> where C: BorrowMut TurnBasedMatcheCancelCall<'a, C, A> { self._match_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheCancelCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10576,8 +10520,8 @@ impl<'a, C, A> TurnBasedMatcheCancelCall<'a, C, A> where C: BorrowMut TurnBasedMatcheFinishCall<'a, C, A> where C: BorrowMut TurnBasedMatcheFinishCall<'a, C, A> where C: BorrowMut TurnBasedMatcheFinishCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the match. + /// /// Sets the *match id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the match. pub fn match_id(mut self, new_value: &str) -> TurnBasedMatcheFinishCall<'a, C, A> { self._match_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> TurnBasedMatcheFinishCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheFinishCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10844,8 +10786,8 @@ impl<'a, C, A> TurnBasedMatcheFinishCall<'a, C, A> where C: BorrowMut TurnBasedMatcheLeaveCall<'a, C, A> where C: BorrowMut TurnBasedMatcheLeaveCall<'a, C, A> where C: BorrowMut TurnBasedMatcheLeaveCall<'a, C, A> { self._match_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> TurnBasedMatcheLeaveCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheLeaveCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11088,8 +11028,8 @@ impl<'a, C, A> TurnBasedMatcheLeaveCall<'a, C, A> where C: BorrowMut TurnBasedMatcheListCall<'a, C, A> where C: BorrowMut TurnBasedMatcheListCall<'a, C, A> where C: BorrowMut TurnBasedMatcheListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of matches to return in the response, used for paging. For any response, the actual number of matches to return may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> TurnBasedMatcheListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *max completed matches* query property to the given value. - /// - /// /// The maximum number of completed or canceled matches to return in the response. If not set, all matches returned could be completed or canceled. + /// + /// Sets the *max completed matches* query property to the given value. pub fn max_completed_matches(mut self, new_value: i32) -> TurnBasedMatcheListCall<'a, C, A> { self._max_completed_matches = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> TurnBasedMatcheListCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *include match data* query property to the given value. - /// - /// /// True if match data should be returned in the response. Note that not all data will necessarily be returned if include_match_data is true; the server may decide to only return data for some of the matches to limit download size for the client. The remainder of the data for these matches will be retrievable on request. + /// + /// Sets the *include match data* query property to the given value. pub fn include_match_data(mut self, new_value: bool) -> TurnBasedMatcheListCall<'a, C, A> { self._include_match_data = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11348,8 +11282,8 @@ impl<'a, C, A> TurnBasedMatcheListCall<'a, C, A> where C: BorrowMut TurnBasedMatcheTakeTurnCall<'a, C, A> where C: BorrowMut TurnBasedMatcheTakeTurnCall<'a, C, A> where C: BorrowMut TurnBasedMatcheTakeTurnCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the match. + /// /// Sets the *match id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the match. pub fn match_id(mut self, new_value: &str) -> TurnBasedMatcheTakeTurnCall<'a, C, A> { self._match_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> TurnBasedMatcheTakeTurnCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheTakeTurnCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11616,8 +11548,8 @@ impl<'a, C, A> TurnBasedMatcheTakeTurnCall<'a, C, A> where C: BorrowMut TurnBasedMatcheRematchCall<'a, C, A> where C: BorrowMut TurnBasedMatcheRematchCall<'a, C, A> where C: BorrowMut TurnBasedMatcheRematchCall<'a, C, A> { self._match_id = new_value.to_string(); self } - /// Sets the *request id* query property to the given value. - /// - /// /// A randomly generated numeric ID for each request specified by the caller. This number is used at the server to ensure that the request is handled correctly across retries. + /// + /// Sets the *request id* query property to the given value. pub fn request_id(mut self, new_value: &str) -> TurnBasedMatcheRematchCall<'a, C, A> { self._request_id = Some(new_value.to_string()); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> TurnBasedMatcheRematchCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheRematchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11873,8 +11802,8 @@ impl<'a, C, A> TurnBasedMatcheRematchCall<'a, C, A> where C: BorrowMut ApplicationGetCall<'a, C, A> where C: BorrowMut, A let mut url = "https://www.googleapis.com/games/v1/applications/{applicationId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{applicationId}", "applicationId")].iter() { @@ -12068,39 +11997,36 @@ impl<'a, C, A> ApplicationGetCall<'a, C, A> where C: BorrowMut, A } + /// The application ID from the Google Play developer console. + /// /// Sets the *application id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The application ID from the Google Play developer console. pub fn application_id(mut self, new_value: &str) -> ApplicationGetCall<'a, C, A> { self._application_id = new_value.to_string(); self } - /// Sets the *platform type* query property to the given value. - /// - /// /// Restrict application details returned to the specific platform. + /// + /// Sets the *platform type* query property to the given value. pub fn platform_type(mut self, new_value: &str) -> ApplicationGetCall<'a, C, A> { self._platform_type = Some(new_value.to_string()); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> ApplicationGetCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ApplicationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12130,8 +12056,8 @@ impl<'a, C, A> ApplicationGetCall<'a, C, A> where C: BorrowMut, A /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12216,7 +12142,7 @@ impl<'a, C, A> ApplicationPlayedCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/games/v1/applications/played".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12278,13 +12204,12 @@ impl<'a, C, A> ApplicationPlayedCall<'a, C, A> where C: BorrowMut } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ApplicationPlayedCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12314,8 +12239,8 @@ impl<'a, C, A> ApplicationPlayedCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12408,7 +12333,7 @@ impl<'a, C, A> RoomGetCall<'a, C, A> where C: BorrowMut, A: oauth let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{roomId}", "roomId")].iter() { @@ -12504,31 +12429,29 @@ impl<'a, C, A> RoomGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// The ID of the room. + /// /// Sets the *room id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the room. pub fn room_id(mut self, new_value: &str) -> RoomGetCall<'a, C, A> { self._room_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> RoomGetCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RoomGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12558,8 +12481,8 @@ impl<'a, C, A> RoomGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12659,7 +12582,7 @@ impl<'a, C, A> RoomLeaveCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}/leave".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{roomId}", "roomId")].iter() { @@ -12763,40 +12686,38 @@ impl<'a, C, A> RoomLeaveCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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: &RoomLeaveRequest) -> RoomLeaveCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the room. + /// /// Sets the *room id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the room. pub fn room_id(mut self, new_value: &str) -> RoomLeaveCall<'a, C, A> { self._room_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> RoomLeaveCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RoomLeaveCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12826,8 +12747,8 @@ impl<'a, C, A> RoomLeaveCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12928,7 +12849,7 @@ impl<'a, C, A> RoomListCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/games/v1/rooms".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13000,37 +12921,33 @@ impl<'a, C, A> RoomListCall<'a, C, A> where C: BorrowMut, A: oaut } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> RoomListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of rooms to return in the response, used for paging. For any response, the actual number of rooms to return may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> RoomListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> RoomListCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RoomListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13060,8 +12977,8 @@ impl<'a, C, A> RoomListCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13161,7 +13078,7 @@ impl<'a, C, A> RoomReportStatuCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}/reportstatus".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{roomId}", "roomId")].iter() { @@ -13265,40 +13182,38 @@ impl<'a, C, A> RoomReportStatuCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &RoomP2PStatuses) -> RoomReportStatuCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the room. + /// /// Sets the *room id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the room. pub fn room_id(mut self, new_value: &str) -> RoomReportStatuCall<'a, C, A> { self._room_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> RoomReportStatuCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RoomReportStatuCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13328,8 +13243,8 @@ impl<'a, C, A> RoomReportStatuCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13427,7 +13342,7 @@ impl<'a, C, A> RoomCreateCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/games/v1/rooms/create".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13507,30 +13422,28 @@ impl<'a, C, A> RoomCreateCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &RoomCreateRequest) -> RoomCreateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> RoomCreateCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RoomCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13560,8 +13473,8 @@ impl<'a, C, A> RoomCreateCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13654,7 +13567,7 @@ impl<'a, C, A> RoomDeclineCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}/decline".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{roomId}", "roomId")].iter() { @@ -13750,31 +13663,29 @@ impl<'a, C, A> RoomDeclineCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the room. + /// /// Sets the *room id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the room. pub fn room_id(mut self, new_value: &str) -> RoomDeclineCall<'a, C, A> { self._room_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> RoomDeclineCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RoomDeclineCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13804,8 +13715,8 @@ impl<'a, C, A> RoomDeclineCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13892,7 +13803,7 @@ impl<'a, C, A> RoomDismisCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}/dismiss".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{roomId}", "roomId")].iter() { @@ -13978,23 +13889,22 @@ impl<'a, C, A> RoomDismisCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the room. + /// /// Sets the *room id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the room. pub fn room_id(mut self, new_value: &str) -> RoomDismisCall<'a, C, A> { self._room_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RoomDismisCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14024,8 +13934,8 @@ impl<'a, C, A> RoomDismisCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14125,7 +14035,7 @@ impl<'a, C, A> RoomJoinCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}/join".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{roomId}", "roomId")].iter() { @@ -14229,40 +14139,38 @@ impl<'a, C, A> RoomJoinCall<'a, C, A> where C: BorrowMut, A: oaut } + /// /// Sets the *request* property to the given value. /// /// 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: &RoomJoinRequest) -> RoomJoinCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the room. + /// /// Sets the *room id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the room. pub fn room_id(mut self, new_value: &str) -> RoomJoinCall<'a, C, A> { self._room_id = new_value.to_string(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> RoomJoinCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RoomJoinCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14292,8 +14200,8 @@ impl<'a, C, A> RoomJoinCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14393,7 +14301,7 @@ impl<'a, C, A> ScoreSubmitCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/games/v1/leaderboards/{leaderboardId}/scores".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{leaderboardId}", "leaderboardId")].iter() { @@ -14489,49 +14397,46 @@ impl<'a, C, A> ScoreSubmitCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the leaderboard. + /// /// Sets the *leaderboard id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the leaderboard. pub fn leaderboard_id(mut self, new_value: &str) -> ScoreSubmitCall<'a, C, A> { self._leaderboard_id = new_value.to_string(); self } + /// The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units. + /// /// Sets the *score* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units. pub fn score(mut self, new_value: &str) -> ScoreSubmitCall<'a, C, A> { self._score = new_value.to_string(); self } - /// Sets the *score tag* query property to the given value. - /// - /// /// Additional information about the score you're submitting. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. + /// + /// Sets the *score tag* query property to the given value. pub fn score_tag(mut self, new_value: &str) -> ScoreSubmitCall<'a, C, A> { self._score_tag = Some(new_value.to_string()); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> ScoreSubmitCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ScoreSubmitCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14561,8 +14466,8 @@ impl<'a, C, A> ScoreSubmitCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14669,7 +14574,7 @@ impl<'a, C, A> ScoreListCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/games/v1/leaderboards/{leaderboardId}/scores/{collection}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{leaderboardId}", "leaderboardId"), ("{collection}", "collection")].iter() { @@ -14765,67 +14670,63 @@ impl<'a, C, A> ScoreListCall<'a, C, A> where C: BorrowMut, A: oau } + /// The ID of the leaderboard. + /// /// Sets the *leaderboard id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the leaderboard. pub fn leaderboard_id(mut self, new_value: &str) -> ScoreListCall<'a, C, A> { self._leaderboard_id = new_value.to_string(); self } + /// The collection of scores you're requesting. + /// /// Sets the *collection* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The collection of scores you're requesting. pub fn collection(mut self, new_value: &str) -> ScoreListCall<'a, C, A> { self._collection = new_value.to_string(); self } + /// The time span for the scores and ranks you're requesting. + /// /// Sets the *time span* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The time span for the scores and ranks you're requesting. pub fn time_span(mut self, new_value: &str) -> ScoreListCall<'a, C, A> { self._time_span = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ScoreListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ScoreListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> ScoreListCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ScoreListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14855,8 +14756,8 @@ impl<'a, C, A> ScoreListCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14969,7 +14870,7 @@ impl<'a, C, A> ScoreGetCall<'a, C, A> where C: BorrowMut, A: oaut let mut url = "https://www.googleapis.com/games/v1/players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{playerId}", "playerId"), ("{leaderboardId}", "leaderboardId"), ("{timeSpan}", "timeSpan")].iter() { @@ -15065,75 +14966,70 @@ impl<'a, C, A> ScoreGetCall<'a, C, A> where C: BorrowMut, A: oaut } + /// A player ID. A value of me may be used in place of the authenticated player's ID. + /// /// Sets the *player id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A player ID. A value of me may be used in place of the authenticated player's ID. pub fn player_id(mut self, new_value: &str) -> ScoreGetCall<'a, C, A> { self._player_id = new_value.to_string(); self } + /// The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all leaderboards for this application. + /// /// Sets the *leaderboard id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all leaderboards for this application. pub fn leaderboard_id(mut self, new_value: &str) -> ScoreGetCall<'a, C, A> { self._leaderboard_id = new_value.to_string(); self } + /// The time span for the scores and ranks you're requesting. + /// /// Sets the *time span* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The time span for the scores and ranks you're requesting. pub fn time_span(mut self, new_value: &str) -> ScoreGetCall<'a, C, A> { self._time_span = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ScoreGetCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ScoreGetCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> ScoreGetCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *include rank type* query property to the given value. - /// - /// /// The types of ranks to return. If the parameter is omitted, no ranks will be returned. + /// + /// Sets the *include rank type* query property to the given value. pub fn include_rank_type(mut self, new_value: &str) -> ScoreGetCall<'a, C, A> { self._include_rank_type = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ScoreGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15163,8 +15059,8 @@ impl<'a, C, A> ScoreGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15262,7 +15158,7 @@ impl<'a, C, A> ScoreSubmitMultipleCall<'a, C, A> where C: BorrowMut ScoreSubmitMultipleCall<'a, C, A> where C: BorrowMut ScoreSubmitMultipleCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> ScoreSubmitMultipleCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ScoreSubmitMultipleCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15395,8 +15289,8 @@ impl<'a, C, A> ScoreSubmitMultipleCall<'a, C, A> where C: BorrowMut ScoreListWindowCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/games/v1/leaderboards/{leaderboardId}/window/{collection}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{leaderboardId}", "leaderboardId"), ("{collection}", "collection")].iter() { @@ -15609,83 +15503,77 @@ impl<'a, C, A> ScoreListWindowCall<'a, C, A> where C: BorrowMut, } + /// The ID of the leaderboard. + /// /// Sets the *leaderboard id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the leaderboard. pub fn leaderboard_id(mut self, new_value: &str) -> ScoreListWindowCall<'a, C, A> { self._leaderboard_id = new_value.to_string(); self } + /// The collection of scores you're requesting. + /// /// Sets the *collection* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The collection of scores you're requesting. pub fn collection(mut self, new_value: &str) -> ScoreListWindowCall<'a, C, A> { self._collection = new_value.to_string(); self } + /// The time span for the scores and ranks you're requesting. + /// /// Sets the *time span* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The time span for the scores and ranks you're requesting. pub fn time_span(mut self, new_value: &str) -> ScoreListWindowCall<'a, C, A> { self._time_span = new_value.to_string(); self } - /// Sets the *return top if absent* query property to the given value. - /// - /// /// True if the top scores should be returned when the player is not in the leaderboard. Defaults to true. + /// + /// Sets the *return top if absent* query property to the given value. pub fn return_top_if_absent(mut self, new_value: bool) -> ScoreListWindowCall<'a, C, A> { self._return_top_if_absent = Some(new_value); self } - /// Sets the *results above* query property to the given value. - /// - /// /// The preferred number of scores to return above the player's score. More scores may be returned if the player is at the bottom of the leaderboard; fewer may be returned if the player is at the top. Must be less than or equal to maxResults. + /// + /// Sets the *results above* query property to the given value. pub fn results_above(mut self, new_value: i32) -> ScoreListWindowCall<'a, C, A> { self._results_above = Some(new_value); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ScoreListWindowCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ScoreListWindowCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> ScoreListWindowCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ScoreListWindowCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15715,8 +15603,8 @@ impl<'a, C, A> ScoreListWindowCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15808,7 +15696,7 @@ impl<'a, C, A> PushtokenRemoveCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/games/v1/pushtokens/remove".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15878,22 +15766,21 @@ impl<'a, C, A> PushtokenRemoveCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &PushTokenId) -> PushtokenRemoveCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PushtokenRemoveCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15923,8 +15810,8 @@ impl<'a, C, A> PushtokenRemoveCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16016,7 +15903,7 @@ impl<'a, C, A> PushtokenUpdateCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/games/v1/pushtokens".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16086,22 +15973,21 @@ impl<'a, C, A> PushtokenUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &PushToken) -> PushtokenUpdateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PushtokenUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16131,8 +16017,8 @@ impl<'a, C, A> PushtokenUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16220,7 +16106,7 @@ impl<'a, C, A> RevisionCheckCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/games/v1/revisions/check".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16292,28 +16178,27 @@ impl<'a, C, A> RevisionCheckCall<'a, C, A> where C: BorrowMut, A: } - /// Sets the *client revision* query property to the given value. - /// - /// Even though the property as already been set when instantiating this call, - /// we provide this method for API completeness. - /// /// The revision of the client SDK used by your application. Format: /// [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are: /// /// - "ANDROID" - Client is running the Android SDK. /// - "IOS" - Client is running the iOS SDK. /// - "WEB_APP" - Client is running as a Web App. + /// + /// Sets the *client revision* query property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. pub fn client_revision(mut self, new_value: &str) -> RevisionCheckCall<'a, C, A> { self._client_revision = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RevisionCheckCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16343,8 +16228,8 @@ impl<'a, C, A> RevisionCheckCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16445,7 +16330,7 @@ impl<'a, C, A> EventListDefinitionCall<'a, C, A> where C: BorrowMut EventListDefinitionCall<'a, C, A> where C: BorrowMut EventListDefinitionCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of event definitions to return in the response, used for paging. For any response, the actual number of event definitions to return may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> EventListDefinitionCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> EventListDefinitionCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventListDefinitionCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16577,8 +16458,8 @@ impl<'a, C, A> EventListDefinitionCall<'a, C, A> where C: BorrowMut EventRecordCall<'a, C, A> where C: BorrowMut, A: o let mut url = "https://www.googleapis.com/games/v1/events".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16756,30 +16637,28 @@ impl<'a, C, A> EventRecordCall<'a, C, A> where C: BorrowMut, A: o } + /// /// Sets the *request* property to the given value. /// /// 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: &EventRecordRequest) -> EventRecordCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> EventRecordCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventRecordCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16809,8 +16688,8 @@ impl<'a, C, A> EventRecordCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16911,7 +16790,7 @@ impl<'a, C, A> EventListByPlayerCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/games/v1/events".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16983,37 +16862,33 @@ impl<'a, C, A> EventListByPlayerCall<'a, C, A> where C: BorrowMut } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> EventListByPlayerCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of events to return in the response, used for paging. For any response, the actual number of events to return may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> EventListByPlayerCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> EventListByPlayerCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventListByPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17043,8 +16918,8 @@ impl<'a, C, A> EventListByPlayerCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17135,7 +17010,7 @@ impl<'a, C, A> QuestMilestoneClaimCall<'a, C, A> where C: BorrowMut QuestMilestoneClaimCall<'a, C, A> where C: BorrowMut QuestMilestoneClaimCall<'a, C, A> { self._quest_id = new_value.to_string(); self } + /// The ID of the milestone. + /// /// Sets the *milestone id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the milestone. pub fn milestone_id(mut self, new_value: &str) -> QuestMilestoneClaimCall<'a, C, A> { self._milestone_id = new_value.to_string(); self } + /// A numeric ID to ensure that the request is handled correctly across retries. Your client application must generate this ID randomly. + /// /// Sets the *request id* query property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A numeric ID to ensure that the request is handled correctly across retries. Your client application must generate this ID randomly. pub fn request_id(mut self, new_value: &str) -> QuestMilestoneClaimCall<'a, C, A> { self._request_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QuestMilestoneClaimCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17287,8 +17161,8 @@ impl<'a, C, A> QuestMilestoneClaimCall<'a, C, A> where C: BorrowMut AchievementDefinitionListCall<'a, C, A> where C: BorrowMut AchievementDefinitionListCall<'a, C, A> where C: BorrowMut AchievementDefinitionListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AchievementDefinitionListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *language* query property to the given value. - /// - /// /// The preferred language to use for strings returned by this method. + /// + /// Sets the *language* query property to the given value. pub fn language(mut self, new_value: &str) -> AchievementDefinitionListCall<'a, C, A> { self._language = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementDefinitionListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17521,8 +17391,8 @@ impl<'a, C, A> AchievementDefinitionListCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/gamesconfiguration1_configuration/src/cmn.rs b/gen/gamesconfiguration1_configuration/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/gamesconfiguration1_configuration/src/cmn.rs +++ b/gen/gamesconfiguration1_configuration/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/gamesconfiguration1_configuration/src/lib.rs b/gen/gamesconfiguration1_configuration/src/lib.rs index 25b9d88eb8..f63da63f54 100644 --- a/gen/gamesconfiguration1_configuration/src/lib.rs +++ b/gen/gamesconfiguration1_configuration/src/lib.rs @@ -113,16 +113,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -282,16 +284,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -406,7 +410,7 @@ impl Part for LocalizedString {} /// /// * [list achievement configurations](struct.AchievementConfigurationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AchievementConfigurationListResponse { /// The pagination token for the next page of results. #[serde(rename="nextPageToken")] @@ -429,7 +433,7 @@ impl ResponseResult for AchievementConfigurationListResponse {} /// /// * [upload image configurations](struct.ImageConfigurationUploadCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImageConfiguration { /// The url for this image. pub url: String, @@ -573,7 +577,7 @@ impl ResponseResult for LeaderboardConfiguration {} /// /// * [list leaderboard configurations](struct.LeaderboardConfigurationListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LeaderboardConfigurationListResponse { /// The pagination token for the next page of results. #[serde(rename="nextPageToken")] @@ -1290,33 +1294,32 @@ impl<'a, C, A> ImageConfigurationUploadCall<'a, C, A> where C: BorrowMut ImageConfigurationUploadCall<'a, C, A> { self._resource_id = new_value.to_string(); self } + /// Selects which image in a resource for this method. + /// /// Sets the *image type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Selects which image in a resource for this method. pub fn image_type(mut self, new_value: &str) -> ImageConfigurationUploadCall<'a, C, A> { self._image_type = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ImageConfigurationUploadCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1346,8 +1349,8 @@ impl<'a, C, A> ImageConfigurationUploadCall<'a, C, A> where C: BorrowMut AchievementConfigurationListCall<'a, C, A> where C: BorrowMut AchievementConfigurationListCall<'a, C, A> { self._application_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AchievementConfigurationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of resource configurations to return in the response, used for paging. For any response, the actual number of resources returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> AchievementConfigurationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementConfigurationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1603,8 +1603,8 @@ impl<'a, C, A> AchievementConfigurationListCall<'a, C, A> where C: BorrowMut AchievementConfigurationUpdateCall<'a, C, A> where C: BorrowMut AchievementConfigurationUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the achievement used by this method. + /// /// Sets the *achievement id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the achievement used by this method. pub fn achievement_id(mut self, new_value: &str) -> AchievementConfigurationUpdateCall<'a, C, A> { self._achievement_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementConfigurationUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1858,8 +1857,8 @@ impl<'a, C, A> AchievementConfigurationUpdateCall<'a, C, A> where C: BorrowMut AchievementConfigurationInsertCall<'a, C, A> where C: BorrowMut AchievementConfigurationInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The application ID from the Google Play developer console. + /// /// Sets the *application id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The application ID from the Google Play developer console. pub fn application_id(mut self, new_value: &str) -> AchievementConfigurationInsertCall<'a, C, A> { self._application_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementConfigurationInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2113,8 +2111,8 @@ impl<'a, C, A> AchievementConfigurationInsertCall<'a, C, A> where C: BorrowMut AchievementConfigurationGetCall<'a, C, A> where C: BorrowMut AchievementConfigurationGetCall<'a, C, A> { self._achievement_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementConfigurationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2344,8 +2341,8 @@ impl<'a, C, A> AchievementConfigurationGetCall<'a, C, A> where C: BorrowMut AchievementConfigurationPatchCall<'a, C, A> where C: BorrowMut AchievementConfigurationPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the achievement used by this method. + /// /// Sets the *achievement id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the achievement used by this method. pub fn achievement_id(mut self, new_value: &str) -> AchievementConfigurationPatchCall<'a, C, A> { self._achievement_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementConfigurationPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2599,8 +2595,8 @@ impl<'a, C, A> AchievementConfigurationPatchCall<'a, C, A> where C: BorrowMut AchievementConfigurationDeleteCall<'a, C, A> where C: BorrowMut AchievementConfigurationDeleteCall<'a, C, A> { self._achievement_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementConfigurationDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2819,8 +2814,8 @@ impl<'a, C, A> AchievementConfigurationDeleteCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationInsertCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The application ID from the Google Play developer console. + /// /// Sets the *application id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The application ID from the Google Play developer console. pub fn application_id(mut self, new_value: &str) -> LeaderboardConfigurationInsertCall<'a, C, A> { self._application_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LeaderboardConfigurationInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3074,8 +3068,8 @@ impl<'a, C, A> LeaderboardConfigurationInsertCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationGetCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationGetCall<'a, C, A> { self._leaderboard_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LeaderboardConfigurationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3305,8 +3298,8 @@ impl<'a, C, A> LeaderboardConfigurationGetCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationPatchCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the leaderboard. + /// /// Sets the *leaderboard id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the leaderboard. pub fn leaderboard_id(mut self, new_value: &str) -> LeaderboardConfigurationPatchCall<'a, C, A> { self._leaderboard_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LeaderboardConfigurationPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3560,8 +3552,8 @@ impl<'a, C, A> LeaderboardConfigurationPatchCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationUpdateCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the leaderboard. + /// /// Sets the *leaderboard id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the leaderboard. pub fn leaderboard_id(mut self, new_value: &str) -> LeaderboardConfigurationUpdateCall<'a, C, A> { self._leaderboard_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LeaderboardConfigurationUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3815,8 +3806,8 @@ impl<'a, C, A> LeaderboardConfigurationUpdateCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationListCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationListCall<'a, C, A> { self._application_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> LeaderboardConfigurationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of resource configurations to return in the response, used for paging. For any response, the actual number of resources returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> LeaderboardConfigurationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LeaderboardConfigurationListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4072,8 +4060,8 @@ impl<'a, C, A> LeaderboardConfigurationListCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationDeleteCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationDeleteCall<'a, C, A> { self._leaderboard_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LeaderboardConfigurationDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4292,8 +4279,8 @@ impl<'a, C, A> LeaderboardConfigurationDeleteCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/gamesmanagement1_management/src/cmn.rs b/gen/gamesmanagement1_management/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/gamesmanagement1_management/src/cmn.rs +++ b/gen/gamesmanagement1_management/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/gamesmanagement1_management/src/lib.rs b/gen/gamesmanagement1_management/src/lib.rs index d3dc02c8a0..7a221cd31a 100644 --- a/gen/gamesmanagement1_management/src/lib.rs +++ b/gen/gamesmanagement1_management/src/lib.rs @@ -113,16 +113,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -284,16 +286,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -365,7 +369,7 @@ impl<'a, C, A> GamesManagement /// /// * [reset achievements](struct.AchievementResetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AchievementResetResponse { /// The ID of an achievement for which player state has been updated. #[serde(rename="definitionId")] @@ -391,7 +395,7 @@ impl ResponseResult for AchievementResetResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerName { /// The given name of this player. In some places, this is known as the first name. #[serde(rename="givenName")] @@ -409,7 +413,7 @@ impl Part for PlayerName {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GamesPlayerExperienceInfoResource { /// The current number of experience points for the player. #[serde(rename="currentExperiencePoints")] @@ -472,7 +476,7 @@ impl RequestValue for AchievementResetMultipleForAllRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GamesPlayedResource { /// True if the player was auto-matched with the currently authenticated user. #[serde(rename="autoMatched")] @@ -494,7 +498,7 @@ impl Part for GamesPlayedResource {} /// /// * [reset all scores](struct.ScoreResetAllCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerScoreResetAllResponse { /// Uniquely identifies the type of this resource. Value is always the fixed string gamesManagement#playerScoreResetResponse. pub kind: String, @@ -515,7 +519,7 @@ impl ResponseResult for PlayerScoreResetAllResponse {} /// * [hide players](struct.PlayerHideCall.html) (none) /// * [unhide players](struct.PlayerUnhideCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Player { /// Uniquely identifies the type of this resource. Value is always the fixed string gamesManagement#player. pub kind: Option, @@ -567,7 +571,7 @@ impl RequestValue for QuestsResetMultipleForAllRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GamesPlayerLevelResource { /// The maximum experience points for this level. #[serde(rename="maxExperiencePoints")] @@ -591,7 +595,7 @@ impl Part for GamesPlayerLevelResource {} /// /// * [list hidden applications](struct.ApplicationListHiddenCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HiddenPlayerList { /// The pagination token for the next page of results. #[serde(rename="nextPageToken")] @@ -614,7 +618,7 @@ impl ResponseResult for HiddenPlayerList {} /// /// * [reset all achievements](struct.AchievementResetAllCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AchievementResetAllResponse { /// Uniquely identifies the type of this resource. Value is always the fixed string gamesManagement#achievementResetAllResponse. pub kind: String, @@ -654,7 +658,7 @@ impl RequestValue for ScoresResetMultipleForAllRequest {} /// /// * [reset scores](struct.ScoreResetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlayerScoreResetResponse { /// The ID of an leaderboard for which player state has been updated. #[serde(rename="definitionId")] @@ -677,7 +681,7 @@ impl ResponseResult for PlayerScoreResetResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HiddenPlayer { /// The player information. pub player: Player, @@ -1566,13 +1570,12 @@ impl<'a, C, A> AchievementResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut< } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementResetAllForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1602,8 +1605,8 @@ impl<'a, C, A> AchievementResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut< /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -1776,23 +1779,22 @@ impl<'a, C, A> AchievementResetForAllPlayerCall<'a, C, A> where C: BorrowMut AchievementResetForAllPlayerCall<'a, C, A> { self._achievement_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementResetForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -1822,8 +1824,8 @@ impl<'a, C, A> AchievementResetForAllPlayerCall<'a, C, A> where C: BorrowMut AchievementResetCall<'a, C, A> where C: BorrowMut, } + /// The ID of the achievement used by this method. + /// /// Sets the *achievement id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the achievement used by this method. pub fn achievement_id(mut self, new_value: &str) -> AchievementResetCall<'a, C, A> { self._achievement_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementResetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2053,8 +2054,8 @@ impl<'a, C, A> AchievementResetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2216,22 +2217,21 @@ impl<'a, C, A> AchievementResetMultipleForAllPlayerCall<'a, C, A> where C: Borro } + /// /// Sets the *request* property to the given value. /// /// 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: &AchievementResetMultipleForAllRequest) -> AchievementResetMultipleForAllPlayerCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AchievementResetMultipleForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2261,8 +2261,8 @@ impl<'a, C, A> AchievementResetMultipleForAllPlayerCall<'a, C, A> where C: Borro /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2420,13 +2420,12 @@ impl<'a, C, A> AchievementResetAllCall<'a, C, A> where C: BorrowMut AchievementResetAllCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2456,8 +2455,8 @@ impl<'a, C, A> AchievementResetAllCall<'a, C, A> where C: BorrowMut PlayerHideCall<'a, C, A> where C: BorrowMut, A: oa } + /// The application ID from the Google Play developer console. + /// /// Sets the *application id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The application ID from the Google Play developer console. pub fn application_id(mut self, new_value: &str) -> PlayerHideCall<'a, C, A> { self._application_id = new_value.to_string(); self } + /// A player ID. A value of me may be used in place of the authenticated player's ID. + /// /// Sets the *player id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A player ID. A value of me may be used in place of the authenticated player's ID. pub fn player_id(mut self, new_value: &str) -> PlayerHideCall<'a, C, A> { self._player_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlayerHideCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2688,8 +2686,8 @@ impl<'a, C, A> PlayerHideCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2864,33 +2862,32 @@ impl<'a, C, A> PlayerUnhideCall<'a, C, A> where C: BorrowMut, A: } + /// The application ID from the Google Play developer console. + /// /// Sets the *application id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The application ID from the Google Play developer console. pub fn application_id(mut self, new_value: &str) -> PlayerUnhideCall<'a, C, A> { self._application_id = new_value.to_string(); self } + /// A player ID. A value of me may be used in place of the authenticated player's ID. + /// /// Sets the *player id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// A player ID. A value of me may be used in place of the authenticated player's ID. pub fn player_id(mut self, new_value: &str) -> PlayerUnhideCall<'a, C, A> { self._player_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PlayerUnhideCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2920,8 +2917,8 @@ impl<'a, C, A> PlayerUnhideCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3083,22 +3080,21 @@ impl<'a, C, A> ScoreResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetMultipleForAllPlayerCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ScoreResetMultipleForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3128,8 +3124,8 @@ impl<'a, C, A> ScoreResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetAllForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3312,8 +3307,8 @@ impl<'a, C, A> ScoreResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetAllCall<'a, C, A> where C: BorrowMut, A: } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ScoreResetAllCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3507,8 +3501,8 @@ impl<'a, C, A> ScoreResetAllCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -3681,23 +3675,22 @@ impl<'a, C, A> ScoreResetForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetForAllPlayerCall<'a, C, A> { self._leaderboard_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ScoreResetForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3727,8 +3720,8 @@ impl<'a, C, A> ScoreResetForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the leaderboard. + /// /// Sets the *leaderboard id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the leaderboard. pub fn leaderboard_id(mut self, new_value: &str) -> ScoreResetCall<'a, C, A> { self._leaderboard_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ScoreResetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3958,8 +3950,8 @@ impl<'a, C, A> ScoreResetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4106,13 +4098,12 @@ impl<'a, C, A> TurnBasedMatcheResetCall<'a, C, A> where C: BorrowMut TurnBasedMatcheResetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4142,8 +4133,8 @@ impl<'a, C, A> TurnBasedMatcheResetCall<'a, C, A> where C: BorrowMut TurnBasedMatcheResetForAllPlayerCall<'a, C, A> where C: BorrowMut } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> TurnBasedMatcheResetForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4326,8 +4316,8 @@ impl<'a, C, A> TurnBasedMatcheResetForAllPlayerCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4521,39 +4511,36 @@ impl<'a, C, A> ApplicationListHiddenCall<'a, C, A> where C: BorrowMut ApplicationListHiddenCall<'a, C, A> { self._application_id = new_value.to_string(); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The token returned by the previous request. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ApplicationListHiddenCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// The maximum number of player resources to return in the response, used for paging. For any response, the actual number of player resources returned may be less than the specified maxResults. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> ApplicationListHiddenCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ApplicationListHiddenCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4583,8 +4570,8 @@ impl<'a, C, A> ApplicationListHiddenCall<'a, C, A> where C: BorrowMut RoomResetForAllPlayerCall<'a, C, A> where C: BorrowMut RoomResetForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4767,8 +4753,8 @@ impl<'a, C, A> RoomResetForAllPlayerCall<'a, C, A> where C: BorrowMut RoomResetCall<'a, C, A> where C: BorrowMut, A: oau } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> RoomResetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4951,8 +4936,8 @@ impl<'a, C, A> RoomResetCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5099,13 +5084,12 @@ impl<'a, C, A> QuestResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetAllForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5135,8 +5119,8 @@ impl<'a, C, A> QuestResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetMultipleForAllPlayerCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QuestResetMultipleForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5343,8 +5326,8 @@ impl<'a, C, A> QuestResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetAllCall<'a, C, A> where C: BorrowMut, A: } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QuestResetAllCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5527,8 +5509,8 @@ impl<'a, C, A> QuestResetAllCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5701,23 +5683,22 @@ impl<'a, C, A> QuestResetForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetForAllPlayerCall<'a, C, A> { self._quest_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QuestResetForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5747,8 +5728,8 @@ impl<'a, C, A> QuestResetForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the quest. + /// /// Sets the *quest id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the quest. pub fn quest_id(mut self, new_value: &str) -> QuestResetCall<'a, C, A> { self._quest_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> QuestResetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5967,8 +5947,8 @@ impl<'a, C, A> QuestResetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6115,13 +6095,12 @@ impl<'a, C, A> EventResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut EventResetAllForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6151,8 +6130,8 @@ impl<'a, C, A> EventResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut EventResetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the event. + /// /// Sets the *event id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the event. pub fn event_id(mut self, new_value: &str) -> EventResetCall<'a, C, A> { self._event_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventResetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6371,8 +6349,8 @@ impl<'a, C, A> EventResetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6519,13 +6497,12 @@ impl<'a, C, A> EventResetAllCall<'a, C, A> where C: BorrowMut, A: } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventResetAllCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6555,8 +6532,8 @@ impl<'a, C, A> EventResetAllCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Game`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6718,22 +6695,21 @@ impl<'a, C, A> EventResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut EventResetMultipleForAllPlayerCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventResetMultipleForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6763,8 +6739,8 @@ impl<'a, C, A> EventResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut EventResetForAllPlayerCall<'a, C, A> where C: BorrowMut EventResetForAllPlayerCall<'a, C, A> { self._event_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventResetForAllPlayerCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6983,8 +6958,8 @@ impl<'a, C, A> EventResetForAllPlayerCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/gan1_beta1/src/cmn.rs b/gen/gan1_beta1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/gan1_beta1/src/cmn.rs +++ b/gen/gan1_beta1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/gan1_beta1/src/lib.rs b/gen/gan1_beta1/src/lib.rs index 16c110aba4..fb2b62c02b 100644 --- a/gen/gan1_beta1/src/lib.rs +++ b/gen/gan1_beta1/src/lib.rs @@ -123,16 +123,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -281,16 +283,18 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -357,7 +361,7 @@ impl<'a, C, A> Gan /// * [list advertisers](struct.AdvertiserListCall.html) (none) /// * [get advertisers](struct.AdvertiserGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Advertiser { /// The status of the requesting publisher's relationship this advertiser. pub status: String, @@ -425,7 +429,7 @@ impl ResponseResult for Advertiser {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CcOfferRewards { /// The kind of purchases covered by this rule. pub category: String, @@ -458,7 +462,7 @@ impl Part for CcOfferRewards {} /// /// * [list links](struct.LinkListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Links { /// The next page token. #[serde(rename="nextPageToken")] @@ -481,7 +485,7 @@ impl ResponseResult for Links {} /// /// * [list publishers](struct.PublisherListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Publishers { /// The 'pageToken' to pass to the next request to get the next page, if there are more to retrieve. #[serde(rename="nextPageToken")] @@ -521,7 +525,7 @@ impl Part for Money {} /// * [list publishers](struct.PublisherListCall.html) (none) /// * [get publishers](struct.PublisherGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Publisher { /// The status of the requesting advertiser's relationship with this publisher. pub status: String, @@ -600,7 +604,7 @@ impl Part for LinkSpecialOffers {} /// /// * [list events](struct.EventListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Events { /// The 'pageToken' to pass to the next request to get the next page, if there are more to retrieve. #[serde(rename="nextPageToken")] @@ -618,7 +622,7 @@ impl ResponseResult for Events {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CcOfferBonusRewards { /// How many units of reward will be granted. pub amount: f64, @@ -634,7 +638,7 @@ impl Part for CcOfferBonusRewards {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CcOfferDefaultFees { /// The type of charge, for example Purchases. pub category: String, @@ -662,7 +666,7 @@ impl Part for CcOfferDefaultFees {} /// /// * [list cc offers](struct.CcOfferListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CcOffers { /// The credit card offers. pub items: Vec, @@ -753,7 +757,7 @@ impl ResponseResult for Link {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventProducts { /// Fee that the advertiser paid to the Google Affiliate Network for this product. #[serde(rename="networkFee")] @@ -794,7 +798,7 @@ impl Part for EventProducts {} /// /// * [get reports](struct.ReportGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Report { /// The totals rows for the report pub totals_rows: Vec>, @@ -828,7 +832,7 @@ impl ResponseResult for Report {} /// /// * [list advertisers](struct.AdvertiserListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Advertisers { /// The 'pageToken' to pass to the next request to get the next page, if there are more to retrieve. #[serde(rename="nextPageToken")] @@ -851,7 +855,7 @@ impl ResponseResult for Advertisers {} /// /// * [list events](struct.EventListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Event { /// The order ID for this event. Only returned for conversion events. #[serde(rename="orderId")] @@ -917,7 +921,7 @@ impl Resource for Event {} /// /// * [list cc offers](struct.CcOfferListCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CcOffer { /// If you get coverage when you use the card for the given activity, this field describes it. #[serde(rename="luggageInsurance")] @@ -1809,89 +1813,81 @@ impl<'a, C, A> PublisherListCall<'a, C, A> where C: BorrowMut, A: } + /// The role of the requester. Valid values: 'advertisers' or 'publishers'. + /// /// Sets the *role* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The role of the requester. Valid values: 'advertisers' or 'publishers'. pub fn role(mut self, new_value: &str) -> PublisherListCall<'a, C, A> { self._role = new_value.to_string(); self } + /// The ID of the requesting advertiser or publisher. + /// /// Sets the *role id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the requesting advertiser or publisher. pub fn role_id(mut self, new_value: &str) -> PublisherListCall<'a, C, A> { self._role_id = new_value.to_string(); self } - /// Sets the *relationship status* query property to the given value. - /// - /// /// Filters out all publishers for which do not have the given relationship status with the requesting publisher. + /// + /// Sets the *relationship status* query property to the given value. pub fn relationship_status(mut self, new_value: &str) -> PublisherListCall<'a, C, A> { self._relationship_status = Some(new_value.to_string()); self } - /// Sets the *publisher category* query property to the given value. - /// - /// /// Caret(^) delimted list of publisher categories. Valid categories: (unclassified|community_and_content|shopping_and_promotion|loyalty_and_rewards|network|search_specialist|comparison_shopping|email). Filters out all publishers not in one of the given advertiser categories. Optional. + /// + /// Sets the *publisher category* query property to the given value. pub fn publisher_category(mut self, new_value: &str) -> PublisherListCall<'a, C, A> { self._publisher_category = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of 'nextPageToken' from the previous page. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> PublisherListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *min seven day epc* query property to the given value. - /// - /// /// Filters out all publishers that have a seven day EPC average lower than the given value (inclusive). Min value 0.0. Optional. + /// + /// Sets the *min seven day epc* query property to the given value. pub fn min_seven_day_epc(mut self, new_value: f64) -> PublisherListCall<'a, C, A> { self._min_seven_day_epc = Some(new_value); self } - /// Sets the *min payout rank* query property to the given value. - /// - /// /// A value between 1 and 4, where 1 represents the quartile of publishers with the lowest ranks and 4 represents the quartile of publishers with the highest ranks. Filters out all publishers with a lower rank than the given quartile. For example if a 2 was given only publishers with a payout rank of 25 or higher would be included. Optional. + /// + /// Sets the *min payout rank* query property to the given value. pub fn min_payout_rank(mut self, new_value: i32) -> PublisherListCall<'a, C, A> { self._min_payout_rank = Some(new_value); self } - /// Sets the *min ninety day epc* query property to the given value. - /// - /// /// Filters out all publishers that have a ninety day EPC average lower than the given value (inclusive). Min value: 0.0. Optional. + /// + /// Sets the *min ninety day epc* query property to the given value. pub fn min_ninety_day_epc(mut self, new_value: f64) -> PublisherListCall<'a, C, A> { self._min_ninety_day_epc = Some(new_value); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Max number of items to return in this page. Optional. Defaults to 20. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> PublisherListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PublisherListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2094,41 +2090,39 @@ impl<'a, C, A> PublisherGetCall<'a, C, A> where C: BorrowMut, A: } + /// The role of the requester. Valid values: 'advertisers' or 'publishers'. + /// /// Sets the *role* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The role of the requester. Valid values: 'advertisers' or 'publishers'. pub fn role(mut self, new_value: &str) -> PublisherGetCall<'a, C, A> { self._role = new_value.to_string(); self } + /// The ID of the requesting advertiser or publisher. + /// /// Sets the *role id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the requesting advertiser or publisher. pub fn role_id(mut self, new_value: &str) -> PublisherGetCall<'a, C, A> { self._role_id = new_value.to_string(); self } - /// Sets the *publisher id* query property to the given value. - /// - /// /// The ID of the publisher to look up. Optional. + /// + /// Sets the *publisher id* query property to the given value. pub fn publisher_id(mut self, new_value: &str) -> PublisherGetCall<'a, C, A> { self._publisher_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> PublisherGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2341,42 +2335,41 @@ impl<'a, C, A> LinkInsertCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &Link) -> LinkInsertCall<'a, C, A> { self._request = new_value.clone(); self } + /// The role of the requester. Valid values: 'advertisers' or 'publishers'. + /// /// Sets the *role* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The role of the requester. Valid values: 'advertisers' or 'publishers'. pub fn role(mut self, new_value: &str) -> LinkInsertCall<'a, C, A> { self._role = new_value.to_string(); self } + /// The ID of the requesting advertiser or publisher. + /// /// Sets the *role id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the requesting advertiser or publisher. pub fn role_id(mut self, new_value: &str) -> LinkInsertCall<'a, C, A> { self._role_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LinkInsertCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2576,43 +2569,42 @@ impl<'a, C, A> LinkGetCall<'a, C, A> where C: BorrowMut, A: oauth } + /// The role of the requester. Valid values: 'advertisers' or 'publishers'. + /// /// Sets the *role* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The role of the requester. Valid values: 'advertisers' or 'publishers'. pub fn role(mut self, new_value: &str) -> LinkGetCall<'a, C, A> { self._role = new_value.to_string(); self } + /// The ID of the requesting advertiser or publisher. + /// /// Sets the *role id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the requesting advertiser or publisher. pub fn role_id(mut self, new_value: &str) -> LinkGetCall<'a, C, A> { self._role_id = new_value.to_string(); self } + /// The ID of the link to look up. + /// /// Sets the *link id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the link to look up. pub fn link_id(mut self, new_value: &str) -> LinkGetCall<'a, C, A> { self._link_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LinkGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -2887,140 +2879,126 @@ impl<'a, C, A> LinkListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// The role of the requester. Valid values: 'advertisers' or 'publishers'. + /// /// Sets the *role* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The role of the requester. Valid values: 'advertisers' or 'publishers'. pub fn role(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._role = new_value.to_string(); self } + /// The ID of the requesting advertiser or publisher. + /// /// Sets the *role id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the requesting advertiser or publisher. pub fn role_id(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._role_id = new_value.to_string(); self } - /// Sets the *start date min* query property to the given value. - /// - /// /// The beginning of the start date range. + /// + /// Sets the *start date min* query property to the given value. pub fn start_date_min(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._start_date_min = Some(new_value.to_string()); self } - /// Sets the *start date max* query property to the given value. - /// - /// /// The end of the start date range. + /// + /// Sets the *start date max* query property to the given value. pub fn start_date_max(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._start_date_max = Some(new_value.to_string()); self } - /// Sets the *search text* query property to the given value. - /// - /// /// Field for full text search across title and merchandising text, supports link id search. + /// + /// Sets the *search text* query property to the given value. pub fn search_text(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._search_text = Some(new_value.to_string()); self } - /// Sets the *relationship status* query property to the given value. - /// - /// /// The status of the relationship. + /// + /// Sets the *relationship status* query property to the given value. pub fn relationship_status(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._relationship_status = Some(new_value.to_string()); self } + /// The promotion type. + /// /// Append the given value to the *promotion type* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The promotion type. pub fn add_promotion_type(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._promotion_type.push(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of 'nextPageToken' from the previous page. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Max number of items to return in this page. Optional. Defaults to 20. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> LinkListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *link type* query property to the given value. - /// - /// /// The type of the link. + /// + /// Sets the *link type* query property to the given value. pub fn link_type(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._link_type = Some(new_value.to_string()); self } - /// Sets the *create date min* query property to the given value. - /// - /// /// The beginning of the create date range. + /// + /// Sets the *create date min* query property to the given value. pub fn create_date_min(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._create_date_min = Some(new_value.to_string()); self } - /// Sets the *create date max* query property to the given value. - /// - /// /// The end of the create date range. + /// + /// Sets the *create date max* query property to the given value. pub fn create_date_max(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._create_date_max = Some(new_value.to_string()); self } - /// Sets the *authorship* query property to the given value. - /// - /// /// The role of the author of the link. + /// + /// Sets the *authorship* query property to the given value. pub fn authorship(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._authorship = Some(new_value.to_string()); self } + /// The size of the given asset. + /// /// Append the given value to the *asset size* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The size of the given asset. pub fn add_asset_size(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._asset_size.push(new_value.to_string()); self } + /// Limits the resulting links to the ones belonging to the listed advertisers. + /// /// Append the given value to the *advertiser id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Limits the resulting links to the ones belonging to the listed advertisers. pub fn add_advertiser_id(mut self, new_value: &str) -> LinkListCall<'a, C, A> { self._advertiser_id.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> LinkListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3291,135 +3269,123 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau } + /// The role of the requester. Valid values: 'advertisers' or 'publishers'. + /// /// Sets the *role* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The role of the requester. Valid values: 'advertisers' or 'publishers'. pub fn role(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._role = new_value.to_string(); self } + /// The ID of the requesting advertiser or publisher. + /// /// Sets the *role id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the requesting advertiser or publisher. pub fn role_id(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._role_id = new_value.to_string(); self } + /// The type of report being requested. Valid values: 'order_delta'. Required. + /// /// Sets the *report type* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The type of report being requested. Valid values: 'order_delta'. Required. pub fn report_type(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._report_type = new_value.to_string(); self } - /// Sets the *status* query property to the given value. - /// - /// /// Filters out all events that do not have the given status. Valid values: 'active', 'canceled', or 'invalid'. Optional. + /// + /// Sets the *status* query property to the given value. pub fn status(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._status = Some(new_value.to_string()); self } - /// Sets the *start index* query property to the given value. - /// - /// /// Offset on which to return results when paging. Optional. + /// + /// Sets the *start index* query property to the given value. pub fn start_index(mut self, new_value: u32) -> ReportGetCall<'a, C, A> { self._start_index = Some(new_value); self } - /// Sets the *start date* query property to the given value. - /// - /// /// The start date (inclusive), in RFC 3339 format, for the report data to be returned. Defaults to one day before endDate, if that is given, or yesterday. Optional. + /// + /// Sets the *start date* query property to the given value. pub fn start_date(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._start_date = Some(new_value.to_string()); self } + /// The IDs of the publishers to look up, if applicable. + /// /// Append the given value to the *publisher id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The IDs of the publishers to look up, if applicable. pub fn add_publisher_id(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._publisher_id.push(new_value.to_string()); self } + /// Filters to capture one of the given order IDs. Optional. + /// /// Append the given value to the *order id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Filters to capture one of the given order IDs. Optional. pub fn add_order_id(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._order_id.push(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Max number of items to return in this page. Optional. Defaults to return all results. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ReportGetCall<'a, C, A> { self._max_results = Some(new_value); self } + /// Filters to capture one of given link IDs. Optional. + /// /// Append the given value to the *link id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// Filters to capture one of given link IDs. Optional. pub fn add_link_id(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._link_id.push(new_value.to_string()); self } - /// Sets the *event type* query property to the given value. - /// - /// /// Filters out all events that are not of the given type. Valid values: 'action', 'transaction', or 'charge'. Optional. + /// + /// Sets the *event type* query property to the given value. pub fn event_type(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._event_type = Some(new_value.to_string()); self } - /// Sets the *end date* query property to the given value. - /// - /// /// The end date (exclusive), in RFC 3339 format, for the report data to be returned. Defaults to one day after startDate, if that is given, or today. Optional. + /// + /// Sets the *end date* query property to the given value. pub fn end_date(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._end_date = Some(new_value.to_string()); self } - /// Sets the *calculate totals* query property to the given value. - /// - /// /// Whether or not to calculate totals rows. Optional. + /// + /// Sets the *calculate totals* query property to the given value. pub fn calculate_totals(mut self, new_value: bool) -> ReportGetCall<'a, C, A> { self._calculate_totals = Some(new_value); self } + /// The IDs of the advertisers to look up, if applicable. + /// /// Append the given value to the *advertiser id* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The IDs of the advertisers to look up, if applicable. pub fn add_advertiser_id(mut self, new_value: &str) -> ReportGetCall<'a, C, A> { self._advertiser_id.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReportGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3629,40 +3595,37 @@ impl<'a, C, A> CcOfferListCall<'a, C, A> where C: BorrowMut, A: o } + /// The ID of the publisher in question. + /// /// Sets the *publisher* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the publisher in question. pub fn publisher(mut self, new_value: &str) -> CcOfferListCall<'a, C, A> { self._publisher = new_value.to_string(); self } - /// Sets the *projection* query property to the given value. - /// - /// /// The set of fields to return. + /// + /// Sets the *projection* query property to the given value. pub fn projection(mut self, new_value: &str) -> CcOfferListCall<'a, C, A> { self._projection = Some(new_value.to_string()); self } + /// The advertiser ID of a card issuer whose offers to include. Optional, may be repeated. + /// /// Append the given value to the *advertiser* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - /// - /// - /// The advertiser ID of a card issuer whose offers to include. Optional, may be repeated. pub fn add_advertiser(mut self, new_value: &str) -> CcOfferListCall<'a, C, A> { self._advertiser.push(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CcOfferListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -3865,41 +3828,39 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: } + /// The role of the requester. Valid values: 'advertisers' or 'publishers'. + /// /// Sets the *role* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The role of the requester. Valid values: 'advertisers' or 'publishers'. pub fn role(mut self, new_value: &str) -> AdvertiserGetCall<'a, C, A> { self._role = new_value.to_string(); self } + /// The ID of the requesting advertiser or publisher. + /// /// Sets the *role id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the requesting advertiser or publisher. pub fn role_id(mut self, new_value: &str) -> AdvertiserGetCall<'a, C, A> { self._role_id = new_value.to_string(); self } - /// Sets the *advertiser id* query property to the given value. - /// - /// /// The ID of the advertiser to look up. Optional. + /// + /// Sets the *advertiser id* query property to the given value. pub fn advertiser_id(mut self, new_value: &str) -> AdvertiserGetCall<'a, C, A> { self._advertiser_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4132,89 +4093,81 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A } + /// The role of the requester. Valid values: 'advertisers' or 'publishers'. + /// /// Sets the *role* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The role of the requester. Valid values: 'advertisers' or 'publishers'. pub fn role(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._role = new_value.to_string(); self } + /// The ID of the requesting advertiser or publisher. + /// /// Sets the *role id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the requesting advertiser or publisher. pub fn role_id(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._role_id = new_value.to_string(); self } - /// Sets the *relationship status* query property to the given value. - /// - /// /// Filters out all advertisers for which do not have the given relationship status with the requesting publisher. + /// + /// Sets the *relationship status* query property to the given value. pub fn relationship_status(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._relationship_status = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of 'nextPageToken' from the previous page. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *min seven day epc* query property to the given value. - /// - /// /// Filters out all advertisers that have a seven day EPC average lower than the given value (inclusive). Min value: 0.0. Optional. + /// + /// Sets the *min seven day epc* query property to the given value. pub fn min_seven_day_epc(mut self, new_value: f64) -> AdvertiserListCall<'a, C, A> { self._min_seven_day_epc = Some(new_value); self } - /// Sets the *min payout rank* query property to the given value. - /// - /// /// A value between 1 and 4, where 1 represents the quartile of advertisers with the lowest ranks and 4 represents the quartile of advertisers with the highest ranks. Filters out all advertisers with a lower rank than the given quartile. For example if a 2 was given only advertisers with a payout rank of 25 or higher would be included. Optional. + /// + /// Sets the *min payout rank* query property to the given value. pub fn min_payout_rank(mut self, new_value: i32) -> AdvertiserListCall<'a, C, A> { self._min_payout_rank = Some(new_value); self } - /// Sets the *min ninety day epc* query property to the given value. - /// - /// /// Filters out all advertisers that have a ninety day EPC average lower than the given value (inclusive). Min value: 0.0. Optional. + /// + /// Sets the *min ninety day epc* query property to the given value. pub fn min_ninety_day_epc(mut self, new_value: f64) -> AdvertiserListCall<'a, C, A> { self._min_ninety_day_epc = Some(new_value); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Max number of items to return in this page. Optional. Defaults to 20. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> AdvertiserListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *advertiser category* query property to the given value. - /// - /// /// Caret(^) delimted list of advertiser categories. Valid categories are defined here: http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581. Filters out all advertisers not in one of the given advertiser categories. Optional. + /// + /// Sets the *advertiser category* query property to the given value. pub fn advertiser_category(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { self._advertiser_category = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AdvertiserListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4492,161 +4445,144 @@ impl<'a, C, A> EventListCall<'a, C, A> where C: BorrowMut, A: oau } + /// The role of the requester. Valid values: 'advertisers' or 'publishers'. + /// /// Sets the *role* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The role of the requester. Valid values: 'advertisers' or 'publishers'. pub fn role(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._role = new_value.to_string(); self } + /// The ID of the requesting advertiser or publisher. + /// /// Sets the *role id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the requesting advertiser or publisher. pub fn role_id(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._role_id = new_value.to_string(); self } - /// Sets the *type* query property to the given value. - /// - /// /// Filters out all events that are not of the given type. Valid values: 'action', 'transaction', 'charge'. Optional. + /// + /// Sets the *type* query property to the given value. pub fn type_(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._type_ = Some(new_value.to_string()); self } - /// Sets the *status* query property to the given value. - /// - /// /// Filters out all events that do not have the given status. Valid values: 'active', 'canceled'. Optional. + /// + /// Sets the *status* query property to the given value. pub fn status(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._status = Some(new_value.to_string()); self } - /// Sets the *sku* query property to the given value. - /// - /// /// Caret(^) delimited list of SKUs. Filters out all events that do not reference one of the given SKU. Optional. + /// + /// Sets the *sku* query property to the given value. pub fn sku(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._sku = Some(new_value.to_string()); self } - /// Sets the *publisher id* query property to the given value. - /// - /// /// Caret(^) delimited list of publisher IDs. Filters out all events that do not reference one of the given publishers IDs. Only used when under advertiser role. Optional. + /// + /// Sets the *publisher id* query property to the given value. pub fn publisher_id(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._publisher_id = Some(new_value.to_string()); self } - /// Sets the *product category* query property to the given value. - /// - /// /// Caret(^) delimited list of product categories. Filters out all events that do not reference a product in one of the given product categories. Optional. + /// + /// Sets the *product category* query property to the given value. pub fn product_category(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._product_category = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The value of 'nextPageToken' from the previous page. Optional. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *order id* query property to the given value. - /// - /// /// Caret(^) delimited list of order IDs. Filters out all events that do not reference one of the given order IDs. Optional. + /// + /// Sets the *order id* query property to the given value. pub fn order_id(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._order_id = Some(new_value.to_string()); self } - /// Sets the *modify date min* query property to the given value. - /// - /// /// Filters out all events modified earlier than given date. Optional. Defaults to 24 hours before the current modifyDateMax, if modifyDateMax is explicitly set. + /// + /// Sets the *modify date min* query property to the given value. pub fn modify_date_min(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._modify_date_min = Some(new_value.to_string()); self } - /// Sets the *modify date max* query property to the given value. - /// - /// /// Filters out all events modified later than given date. Optional. Defaults to 24 hours after modifyDateMin, if modifyDateMin is explicitly set. + /// + /// Sets the *modify date max* query property to the given value. pub fn modify_date_max(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._modify_date_max = Some(new_value.to_string()); self } - /// Sets the *member id* query property to the given value. - /// - /// /// Caret(^) delimited list of member IDs. Filters out all events that do not reference one of the given member IDs. Optional. + /// + /// Sets the *member id* query property to the given value. pub fn member_id(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._member_id = Some(new_value.to_string()); self } - /// Sets the *max results* query property to the given value. - /// - /// /// Max number of offers to return in this page. Optional. Defaults to 20. + /// + /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> EventListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets the *link id* query property to the given value. - /// - /// /// Caret(^) delimited list of link IDs. Filters out all events that do not reference one of the given link IDs. Optional. + /// + /// Sets the *link id* query property to the given value. pub fn link_id(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._link_id = Some(new_value.to_string()); self } - /// Sets the *event date min* query property to the given value. - /// - /// /// Filters out all events earlier than given date. Optional. Defaults to 24 hours from current date/time. + /// + /// Sets the *event date min* query property to the given value. pub fn event_date_min(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._event_date_min = Some(new_value.to_string()); self } - /// Sets the *event date max* query property to the given value. - /// - /// /// Filters out all events later than given date. Optional. Defaults to 24 hours after eventMin. + /// + /// Sets the *event date max* query property to the given value. pub fn event_date_max(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._event_date_max = Some(new_value.to_string()); self } - /// Sets the *charge type* query property to the given value. - /// - /// /// Filters out all charge events that are not of the given charge type. Valid values: 'other', 'slotting_fee', 'monthly_minimum', 'tier_bonus', 'credit', 'debit'. Optional. + /// + /// Sets the *charge type* query property to the given value. pub fn charge_type(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._charge_type = Some(new_value.to_string()); self } - /// Sets the *advertiser id* query property to the given value. - /// - /// /// Caret(^) delimited list of advertiser IDs. Filters out all events that do not reference one of the given advertiser IDs. Only used when under publishers role. Optional. + /// + /// Sets the *advertiser id* query property to the given value. pub fn advertiser_id(mut self, new_value: &str) -> EventListCall<'a, C, A> { self._advertiser_id = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> EventListCall<'a, C, A> { self._delegate = Some(new_value); self diff --git a/gen/genomics1_beta2/README.md b/gen/genomics1_beta2/README.md index 08217bf3cb..4df8acb406 100644 --- a/gen/genomics1_beta2/README.md +++ b/gen/genomics1_beta2/README.md @@ -133,16 +133,18 @@ let result = hub.annotations().patch(&req, "annotationId") match result { Err(e) => match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/genomics1_beta2/src/cmn.rs b/gen/genomics1_beta2/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/genomics1_beta2/src/cmn.rs +++ b/gen/genomics1_beta2/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/genomics1_beta2/src/lib.rs b/gen/genomics1_beta2/src/lib.rs index 60451ebf8b..d2a6ef81e5 100644 --- a/gen/genomics1_beta2/src/lib.rs +++ b/gen/genomics1_beta2/src/lib.rs @@ -134,16 +134,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -319,16 +321,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -415,7 +419,7 @@ impl<'a, C, A> Genomics /// /// * [batch create annotations](struct.AnnotationBatchCreateCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BatchAnnotationsResponse { /// The resulting per-annotation entries, ordered consistently with the original request. pub entries: Vec, @@ -471,7 +475,7 @@ impl Part for Int32Value {} /// /// * [search jobs](struct.JobSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchJobsResponse { /// The continuation token which is used to page through large result sets. Provide this value is a subsequent request to return the next page of results. This field will be empty if there are no more results. #[serde(rename="nextPageToken")] @@ -591,7 +595,7 @@ impl Part for Metadata {} /// /// * [coveragebuckets list readgroupsets](struct.ReadgroupsetCoveragebucketListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListCoverageBucketsResponse { /// The coverage buckets. The list of buckets is sparse; a bucket with 0 overlapping reads is not returned. A bucket never crosses more than one reference sequence. Each bucket has width bucketWidth, unless its end is the end of the reference sequence. #[serde(rename="coverageBuckets")] @@ -642,7 +646,7 @@ impl Part for FastqMetadata {} /// /// * [export variantsets](struct.VariantsetExportCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExportVariantSetResponse { /// A job ID that can be used to get status information. #[serde(rename="jobId")] @@ -661,7 +665,7 @@ impl ResponseResult for ExportVariantSetResponse {} /// /// * [search annotations](struct.AnnotationSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchAnnotationsResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] @@ -803,7 +807,7 @@ impl ResponseResult for Annotation {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobRequest { /// The data source of the request, for example, a Google Cloud Storage object path or Readset ID. pub source: Vec, @@ -826,7 +830,7 @@ impl Part for JobRequest {} /// /// * [search variants](struct.VariantSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchVariantsResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] @@ -950,7 +954,7 @@ impl ResponseResult for CallSet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Position { /// The 0-based offset from the start of the forward strand for that reference. pub position: String, @@ -974,7 +978,7 @@ impl Part for Position {} /// /// * [import variants variantsets](struct.VariantsetImportVariantCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImportVariantsResponse { /// A job ID that can be used to get status information. #[serde(rename="jobId")] @@ -1043,7 +1047,7 @@ impl RequestValue for SearchCallSetsRequest {} /// /// * [list datasets](struct.DatasetListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListDatasetsResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] @@ -1092,7 +1096,7 @@ impl RequestValue for ImportReadGroupSetsRequest {} /// /// * [call readgroupsets](struct.ReadgroupsetCallCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CallReadGroupSetsResponse { /// A job ID that can be used to get status information. #[serde(rename="jobId")] @@ -1113,7 +1117,7 @@ impl ResponseResult for CallReadGroupSetsResponse {} /// * [search references](struct.ReferenceSearchCall.html) (none) /// * [get references](struct.ReferenceGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Reference { /// The length of this reference's sequence. pub length: String, @@ -1241,7 +1245,7 @@ impl Part for ReadGroup {} /// /// * [search readgroupsets](struct.ReadgroupsetSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchReadGroupSetsResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] @@ -1263,7 +1267,7 @@ impl ResponseResult for SearchReadGroupSetsResponse {} /// /// * [import readgroupsets](struct.ReadgroupsetImportCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImportReadGroupSetsResponse { /// A job ID that can be used to get status information. #[serde(rename="jobId")] @@ -1282,7 +1286,7 @@ impl ResponseResult for ImportReadGroupSetsResponse {} /// /// * [export readgroupsets](struct.ReadgroupsetExportCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExportReadGroupSetsResponse { /// A job ID that can be used to get status information. #[serde(rename="jobId")] @@ -1323,7 +1327,7 @@ impl RequestValue for SearchReadGroupSetsRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BatchAnnotationsResponseEntry { /// The resulting status for this annotation operation. pub status: BatchAnnotationsResponseEntryStatus, @@ -1338,7 +1342,7 @@ impl Part for BatchAnnotationsResponseEntry {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BatchAnnotationsResponseEntryStatus { /// Error message for this status, if any. pub message: String, @@ -1358,7 +1362,7 @@ impl Part for BatchAnnotationsResponseEntryStatus {} /// /// * [bases list references](struct.ReferenceBaseListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListBasesResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] @@ -1424,7 +1428,7 @@ impl Part for Call {} /// /// * [jobs create experimental](struct.ExperimentalJobCreateCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExperimentalCreateJobResponse { /// A job ID that can be used to get status information. #[serde(rename="jobId")] @@ -1521,7 +1525,7 @@ impl ResponseResult for Dataset {} /// /// * [search reads](struct.ReadSearchCall.html) (none) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Read { /// The ID of the read group set this read belongs to. (Every read must belong to exactly one read group set.) #[serde(rename="readGroupSetId")] @@ -1671,7 +1675,7 @@ impl ResponseResult for Variant {} /// /// * [search annotation sets](struct.AnnotationSetSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchAnnotationSetsResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] @@ -1695,7 +1699,7 @@ impl ResponseResult for SearchAnnotationSetsResponse {} /// * [search jobs](struct.JobSearchCall.html) (none) /// * [get jobs](struct.JobGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Job { /// A more detailed description of this job's current status. #[serde(rename="detailedStatus")] @@ -1822,7 +1826,7 @@ impl RequestValue for ExportReadGroupSetsRequest {} /// /// * [search referencesets](struct.ReferencesetSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchReferenceSetsResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] @@ -1844,7 +1848,7 @@ impl ResponseResult for SearchReferenceSetsResponse {} /// /// * [get referencesets](struct.ReferencesetGetCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReferenceSet { /// Free text description of this reference set. pub description: String, @@ -1912,7 +1916,7 @@ impl ResponseResult for VariantSet {} /// /// * [align readgroupsets](struct.ReadgroupsetAlignCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AlignReadGroupSetsResponse { /// A job ID that can be used to get status information. #[serde(rename="jobId")] @@ -2007,7 +2011,7 @@ impl RequestValue for SearchReadsRequest {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Range { /// The start position of the range on the reference, 0-based inclusive. If specified, referenceName must also be specified. pub start: String, @@ -2062,7 +2066,7 @@ impl RequestValue for SearchAnnotationSetsRequest {} /// /// * [search reads](struct.ReadSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchReadsResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] @@ -2099,7 +2103,7 @@ impl Part for InterleavedFastqSource {} /// /// * [search references](struct.ReferenceSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchReferencesResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] @@ -2205,7 +2209,7 @@ impl Part for QueryRange {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LinearAlignment { /// The position of this alignment. pub position: Position, @@ -2264,7 +2268,7 @@ impl ResponseResult for AnnotationSet {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CigarUnit { /// referenceSequence is only used at mismatches (SEQUENCE_MISMATCH) and deletions (DELETE). Filling this field replaces SAM's MD tag. If the relevant information is not available, this field is unset. #[serde(rename="referenceSequence")] @@ -2322,7 +2326,7 @@ impl Part for TranscriptExon {} /// /// * [search variantsets](struct.VariantsetSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchVariantSetsResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] @@ -2339,7 +2343,7 @@ impl ResponseResult for SearchVariantSetsResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CoverageBucket { /// The average number of reads which are aligned to each individual reference base in this bucket. #[serde(rename="meanCoverage")] @@ -2360,7 +2364,7 @@ impl Part for CoverageBucket {} /// /// * [search callsets](struct.CallsetSearchCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchCallSetsResponse { /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] @@ -4120,7 +4124,7 @@ impl<'a, C, A> DatasetCreateCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/datasets".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4200,22 +4204,21 @@ impl<'a, C, A> DatasetCreateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Dataset) -> DatasetCreateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4245,8 +4248,8 @@ impl<'a, C, A> DatasetCreateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4341,7 +4344,7 @@ impl<'a, C, A> DatasetUpdateCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/datasets/{datasetId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{datasetId}", "datasetId")].iter() { @@ -4445,32 +4448,31 @@ impl<'a, C, A> DatasetUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Dataset) -> DatasetUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the dataset to be updated. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the dataset to be updated. pub fn dataset_id(mut self, new_value: &str) -> DatasetUpdateCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4500,8 +4502,8 @@ impl<'a, C, A> DatasetUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4588,7 +4590,7 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/datasets/{datasetId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{datasetId}", "datasetId")].iter() { @@ -4674,23 +4676,22 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the dataset to be deleted. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the dataset to be deleted. pub fn dataset_id(mut self, new_value: &str) -> DatasetDeleteCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4720,8 +4721,8 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4809,7 +4810,7 @@ impl<'a, C, A> DatasetUndeleteCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/datasets/{datasetId}/undelete".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{datasetId}", "datasetId")].iter() { @@ -4905,23 +4906,22 @@ impl<'a, C, A> DatasetUndeleteCall<'a, C, A> where C: BorrowMut, } + /// The ID of the dataset to be undeleted. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the dataset to be undeleted. pub fn dataset_id(mut self, new_value: &str) -> DatasetUndeleteCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetUndeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -4951,8 +4951,8 @@ impl<'a, C, A> DatasetUndeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5136,23 +5136,22 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the dataset. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetGetCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5182,8 +5181,8 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5278,7 +5277,7 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/datasets/{datasetId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{datasetId}", "datasetId")].iter() { @@ -5382,32 +5381,31 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Dataset) -> DatasetPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the dataset to be updated. + /// /// Sets the *dataset id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the dataset to be updated. pub fn dataset_id(mut self, new_value: &str) -> DatasetPatchCall<'a, C, A> { self._dataset_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5437,8 +5435,8 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5611,37 +5609,33 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o } - /// Sets the *project number* query property to the given value. - /// - /// /// The project to list datasets for. + /// + /// Sets the *project number* query property to the given value. pub fn project_number(mut self, new_value: &str) -> DatasetListCall<'a, C, A> { self._project_number = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DatasetListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *page size* query property to the given value. - /// - /// /// The maximum number of results returned by this request. If unspecified, defaults to 50. + /// + /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> DatasetListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> DatasetListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5671,8 +5665,8 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -5759,7 +5753,7 @@ impl<'a, C, A> JobCancelCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/genomics/v1beta2/jobs/{jobId}/cancel".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{jobId}", "jobId")].iter() { @@ -5845,23 +5839,22 @@ impl<'a, C, A> JobCancelCall<'a, C, A> where C: BorrowMut, A: oau } + /// Required. The ID of the job. + /// /// Sets the *job id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Required. The ID of the job. pub fn job_id(mut self, new_value: &str) -> JobCancelCall<'a, C, A> { self._job_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobCancelCall<'a, C, A> { self._delegate = Some(new_value); self @@ -5891,8 +5884,8 @@ impl<'a, C, A> JobCancelCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6076,23 +6069,22 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } + /// Required. The ID of the job. + /// /// Sets the *job id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Required. The ID of the job. pub fn job_id(mut self, new_value: &str) -> JobGetCall<'a, C, A> { self._job_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6122,8 +6114,8 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6216,7 +6208,7 @@ impl<'a, C, A> JobSearchCall<'a, C, A> where C: BorrowMut, A: oau let mut url = "https://www.googleapis.com/genomics/v1beta2/jobs/search".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6296,22 +6288,21 @@ impl<'a, C, A> JobSearchCall<'a, C, A> where C: BorrowMut, A: oau } + /// /// Sets the *request* property to the given value. /// /// 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: &SearchJobsRequest) -> JobSearchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> JobSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6341,8 +6332,8 @@ impl<'a, C, A> JobSearchCall<'a, C, A> where C: BorrowMut, A: oau /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6437,7 +6428,7 @@ impl<'a, C, A> ReferencesetSearchCall<'a, C, A> where C: BorrowMut ReferencesetSearchCall<'a, C, A> where C: BorrowMut ReferencesetSearchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReferencesetSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6562,8 +6552,8 @@ impl<'a, C, A> ReferencesetSearchCall<'a, C, A> where C: BorrowMut ReferencesetGetCall<'a, C, A> where C: BorrowMut, } + /// The ID of the reference set. + /// /// Sets the *reference set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the reference set. pub fn reference_set_id(mut self, new_value: &str) -> ReferencesetGetCall<'a, C, A> { self._reference_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReferencesetGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -6795,8 +6784,8 @@ impl<'a, C, A> ReferencesetGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -6855,7 +6844,6 @@ pub struct StreamingVariantStoreStreamvariantCall<'a, C, A> _request: StreamVariantsRequest, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, - _scopes: BTreeMap } impl<'a, C, A> CallBuilder for StreamingVariantStoreStreamvariantCall<'a, C, A> {} @@ -6888,8 +6876,17 @@ impl<'a, C, A> StreamingVariantStoreStreamvariantCall<'a, C, A> where C: BorrowM params.push(("alt", "json".to_string())); let mut url = "https://www.googleapis.com/genomics/v1beta2/streamingVariantStore/streamvariants".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } } @@ -6905,22 +6902,11 @@ impl<'a, C, A> StreamingVariantStoreStreamvariantCall<'a, C, A> where C: BorrowM loop { - let mut token = self.hub.auth.borrow_mut().token(self._scopes.keys()); - if token.is_none() { - token = dlg.token(); - } - if token.is_none() { - dlg.finished(false); - return Err(Error::MissingToken) - } - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.unwrap().access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref()) .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) .header(ContentType(json_mime_type.clone())) .header(ContentLength(request_size as u64)) .body(&mut request_value_reader); @@ -6969,22 +6955,21 @@ impl<'a, C, A> StreamingVariantStoreStreamvariantCall<'a, C, A> where C: BorrowM } + /// /// Sets the *request* property to the given value. /// /// 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: &StreamVariantsRequest) -> StreamingVariantStoreStreamvariantCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> StreamingVariantStoreStreamvariantCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7012,22 +6997,6 @@ impl<'a, C, A> StreamingVariantStoreStreamvariantCall<'a, C, A> where C: BorrowM self } - /// Identifies the authorization scope for the method you are building. - /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. - /// - /// The `scope` will be added to a set of scopes. This is important as one can maintain access - /// tokens for more than one scope. - /// - /// 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(mut self, scope: T) -> StreamingVariantStoreStreamvariantCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } } @@ -7102,7 +7071,7 @@ impl<'a, C, A> CallsetDeleteCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/callsets/{callSetId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{callSetId}", "callSetId")].iter() { @@ -7188,23 +7157,22 @@ impl<'a, C, A> CallsetDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the call set to be deleted. + /// /// Sets the *call set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the call set to be deleted. pub fn call_set_id(mut self, new_value: &str) -> CallsetDeleteCall<'a, C, A> { self._call_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CallsetDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7234,8 +7202,8 @@ impl<'a, C, A> CallsetDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7330,7 +7298,7 @@ impl<'a, C, A> CallsetSearchCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/callsets/search".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7410,22 +7378,21 @@ impl<'a, C, A> CallsetSearchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &SearchCallSetsRequest) -> CallsetSearchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CallsetSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7455,8 +7422,8 @@ impl<'a, C, A> CallsetSearchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7551,7 +7518,7 @@ impl<'a, C, A> CallsetPatchCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/callsets/{callSetId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{callSetId}", "callSetId")].iter() { @@ -7655,32 +7622,31 @@ impl<'a, C, A> CallsetPatchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &CallSet) -> CallsetPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the call set to be updated. + /// /// Sets the *call set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the call set to be updated. pub fn call_set_id(mut self, new_value: &str) -> CallsetPatchCall<'a, C, A> { self._call_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CallsetPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7710,8 +7676,8 @@ impl<'a, C, A> CallsetPatchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7804,7 +7770,7 @@ impl<'a, C, A> CallsetCreateCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/callsets".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7884,22 +7850,21 @@ impl<'a, C, A> CallsetCreateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &CallSet) -> CallsetCreateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CallsetCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -7929,8 +7894,8 @@ impl<'a, C, A> CallsetCreateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8114,23 +8079,22 @@ impl<'a, C, A> CallsetGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the call set. + /// /// Sets the *call set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the call set. pub fn call_set_id(mut self, new_value: &str) -> CallsetGetCall<'a, C, A> { self._call_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CallsetGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8160,8 +8124,8 @@ impl<'a, C, A> CallsetGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8256,7 +8220,7 @@ impl<'a, C, A> CallsetUpdateCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/callsets/{callSetId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{callSetId}", "callSetId")].iter() { @@ -8360,32 +8324,31 @@ impl<'a, C, A> CallsetUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &CallSet) -> CallsetUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the call set to be updated. + /// /// Sets the *call set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the call set to be updated. pub fn call_set_id(mut self, new_value: &str) -> CallsetUpdateCall<'a, C, A> { self._call_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> CallsetUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8415,8 +8378,8 @@ impl<'a, C, A> CallsetUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8515,7 +8478,7 @@ impl<'a, C, A> ReadSearchCall<'a, C, A> where C: BorrowMut, A: oa let mut url = "https://www.googleapis.com/genomics/v1beta2/reads/search".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8595,22 +8558,21 @@ impl<'a, C, A> ReadSearchCall<'a, C, A> where C: BorrowMut, A: oa } + /// /// Sets the *request* property to the given value. /// /// 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: &SearchReadsRequest) -> ReadSearchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReadSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8640,8 +8602,8 @@ impl<'a, C, A> ReadSearchCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8736,7 +8698,7 @@ impl<'a, C, A> ReadgroupsetUpdateCall<'a, C, A> where C: BorrowMut ReadgroupsetUpdateCall<'a, C, A> where C: BorrowMut ReadgroupsetUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the read group set to be updated. The caller must have WRITE permissions to the dataset associated with this read group set. + /// /// Sets the *read group set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the read group set to be updated. The caller must have WRITE permissions to the dataset associated with this read group set. pub fn read_group_set_id(mut self, new_value: &str) -> ReadgroupsetUpdateCall<'a, C, A> { self._read_group_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReadgroupsetUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -8895,8 +8856,8 @@ impl<'a, C, A> ReadgroupsetUpdateCall<'a, C, A> where C: BorrowMut ReadgroupsetExportCall<'a, C, A> where C: BorrowMut ReadgroupsetExportCall<'a, C, A> where C: BorrowMut ReadgroupsetExportCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReadgroupsetExportCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9116,8 +9076,8 @@ impl<'a, C, A> ReadgroupsetExportCall<'a, C, A> where C: BorrowMut ReadgroupsetImportCall<'a, C, A> where C: BorrowMut ReadgroupsetImportCall<'a, C, A> where C: BorrowMut ReadgroupsetImportCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReadgroupsetImportCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9337,8 +9296,8 @@ impl<'a, C, A> ReadgroupsetImportCall<'a, C, A> where C: BorrowMut ReadgroupsetPatchCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/genomics/v1beta2/readgroupsets/{readGroupSetId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{readGroupSetId}", "readGroupSetId")].iter() { @@ -9537,32 +9496,31 @@ impl<'a, C, A> ReadgroupsetPatchCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &ReadGroupSet) -> ReadgroupsetPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the read group set to be updated. The caller must have WRITE permissions to the dataset associated with this read group set. + /// /// Sets the *read group set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the read group set to be updated. The caller must have WRITE permissions to the dataset associated with this read group set. pub fn read_group_set_id(mut self, new_value: &str) -> ReadgroupsetPatchCall<'a, C, A> { self._read_group_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReadgroupsetPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9592,8 +9550,8 @@ impl<'a, C, A> ReadgroupsetPatchCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9686,7 +9644,7 @@ impl<'a, C, A> ReadgroupsetCallCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/readgroupsets/call".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::DevstorageReadWrite.as_ref().to_string(), ()); } @@ -9766,22 +9724,21 @@ impl<'a, C, A> ReadgroupsetCallCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &CallReadGroupSetsRequest) -> ReadgroupsetCallCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReadgroupsetCallCall<'a, C, A> { self._delegate = Some(new_value); self @@ -9811,8 +9768,8 @@ impl<'a, C, A> ReadgroupsetCallCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DevstorageReadWrite`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -9905,7 +9862,7 @@ impl<'a, C, A> ReadgroupsetAlignCall<'a, C, A> where C: BorrowMut let mut url = "https://www.googleapis.com/genomics/v1beta2/readgroupsets/align".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::DevstorageReadWrite.as_ref().to_string(), ()); } @@ -9985,22 +9942,21 @@ impl<'a, C, A> ReadgroupsetAlignCall<'a, C, A> where C: BorrowMut } + /// /// Sets the *request* property to the given value. /// /// 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: &AlignReadGroupSetsRequest) -> ReadgroupsetAlignCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReadgroupsetAlignCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10030,8 +9986,8 @@ impl<'a, C, A> ReadgroupsetAlignCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::DevstorageReadWrite`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -10247,71 +10203,64 @@ impl<'a, C, A> ReadgroupsetCoveragebucketListCall<'a, C, A> where C: BorrowMut ReadgroupsetCoveragebucketListCall<'a, C, A> { self._read_group_set_id = new_value.to_string(); self } - /// Sets the *target bucket width* query property to the given value. - /// - /// /// The desired width of each reported coverage bucket in base pairs. This will be rounded down to the nearest precomputed bucket width; the value of which is returned as bucketWidth in the response. Defaults to infinity (each bucket spans an entire reference sequence) or the length of the target range, if specified. The smallest precomputed bucketWidth is currently 2048 base pairs; this is subject to change. + /// + /// Sets the *target bucket width* query property to the given value. pub fn target_bucket_width(mut self, new_value: &str) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { self._target_bucket_width = Some(new_value.to_string()); self } - /// Sets the *range.start* query property to the given value. - /// - /// /// The start position of the range on the reference, 0-based inclusive. If specified, referenceName must also be specified. + /// + /// Sets the *range.start* query property to the given value. pub fn range_start(mut self, new_value: &str) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { self._range_start = Some(new_value.to_string()); self } - /// Sets the *range.reference name* query property to the given value. - /// - /// /// The reference sequence name, for example chr1, 1, or chrX. + /// + /// Sets the *range.reference name* query property to the given value. pub fn range_reference_name(mut self, new_value: &str) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { self._range_reference_name = Some(new_value.to_string()); self } - /// Sets the *range.end* query property to the given value. - /// - /// /// The end position of the range on the reference, 0-based exclusive. If specified, referenceName must also be specified. + /// + /// Sets the *range.end* query property to the given value. pub fn range_end(mut self, new_value: &str) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { self._range_end = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *page size* query property to the given value. - /// - /// /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. The maximum value is 2048. + /// + /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10341,8 +10290,8 @@ impl<'a, C, A> ReadgroupsetCoveragebucketListCall<'a, C, A> where C: BorrowMut ReadgroupsetDeleteCall<'a, C, A> where C: BorrowMut ReadgroupsetDeleteCall<'a, C, A> where C: BorrowMut ReadgroupsetDeleteCall<'a, C, A> { self._read_group_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReadgroupsetDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10561,8 +10509,8 @@ impl<'a, C, A> ReadgroupsetDeleteCall<'a, C, A> where C: BorrowMut ReadgroupsetSearchCall<'a, C, A> where C: BorrowMut ReadgroupsetSearchCall<'a, C, A> where C: BorrowMut ReadgroupsetSearchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReadgroupsetSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -10782,8 +10729,8 @@ impl<'a, C, A> ReadgroupsetSearchCall<'a, C, A> where C: BorrowMut ReadgroupsetGetCall<'a, C, A> where C: BorrowMut, } + /// The ID of the read group set. + /// /// Sets the *read group set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the read group set. pub fn read_group_set_id(mut self, new_value: &str) -> ReadgroupsetGetCall<'a, C, A> { self._read_group_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReadgroupsetGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11013,8 +10959,8 @@ impl<'a, C, A> ReadgroupsetGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11220,55 +11166,50 @@ impl<'a, C, A> ReferenceBaseListCall<'a, C, A> where C: BorrowMut } + /// The ID of the reference. + /// /// Sets the *reference id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the reference. pub fn reference_id(mut self, new_value: &str) -> ReferenceBaseListCall<'a, C, A> { self._reference_id = new_value.to_string(); self } - /// Sets the *start* query property to the given value. - /// - /// /// The start position (0-based) of this query. Defaults to 0. + /// + /// Sets the *start* query property to the given value. pub fn start(mut self, new_value: &str) -> ReferenceBaseListCall<'a, C, A> { self._start = Some(new_value.to_string()); self } - /// Sets the *page token* query property to the given value. - /// - /// /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response. + /// + /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ReferenceBaseListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Sets the *page size* query property to the given value. - /// - /// /// Specifies the maximum number of bases to return in a single page. + /// + /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> ReferenceBaseListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// Sets the *end* query property to the given value. - /// - /// /// The end position (0-based, exclusive) of this query. Defaults to the length of this reference. + /// + /// Sets the *end* query property to the given value. pub fn end(mut self, new_value: &str) -> ReferenceBaseListCall<'a, C, A> { self._end = Some(new_value.to_string()); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReferenceBaseListCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11298,8 +11239,8 @@ impl<'a, C, A> ReferenceBaseListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11394,7 +11335,7 @@ impl<'a, C, A> ReferenceSearchCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/references/search".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11474,22 +11415,21 @@ impl<'a, C, A> ReferenceSearchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &SearchReferencesRequest) -> ReferenceSearchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReferenceSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11519,8 +11459,8 @@ impl<'a, C, A> ReferenceSearchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11706,23 +11646,22 @@ impl<'a, C, A> ReferenceGetCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the reference. + /// /// Sets the *reference id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the reference. pub fn reference_id(mut self, new_value: &str) -> ReferenceGetCall<'a, C, A> { self._reference_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ReferenceGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11752,8 +11691,8 @@ impl<'a, C, A> ReferenceGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11937,23 +11876,22 @@ impl<'a, C, A> AnnotationSetGetCall<'a, C, A> where C: BorrowMut, } + /// The ID of the annotation set to be retrieved. + /// /// Sets the *annotation set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the annotation set to be retrieved. pub fn annotation_set_id(mut self, new_value: &str) -> AnnotationSetGetCall<'a, C, A> { self._annotation_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationSetGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -11983,8 +11921,8 @@ impl<'a, C, A> AnnotationSetGetCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -12079,7 +12017,7 @@ impl<'a, C, A> AnnotationSetUpdateCall<'a, C, A> where C: BorrowMut AnnotationSetUpdateCall<'a, C, A> where C: BorrowMut AnnotationSetUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the annotation set to be updated. + /// /// Sets the *annotation set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the annotation set to be updated. pub fn annotation_set_id(mut self, new_value: &str) -> AnnotationSetUpdateCall<'a, C, A> { self._annotation_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationSetUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12238,8 +12175,8 @@ impl<'a, C, A> AnnotationSetUpdateCall<'a, C, A> where C: BorrowMut AnnotationSetCreateCall<'a, C, A> where C: BorrowMut AnnotationSetCreateCall<'a, C, A> where C: BorrowMut AnnotationSetCreateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationSetCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12457,8 +12393,8 @@ impl<'a, C, A> AnnotationSetCreateCall<'a, C, A> where C: BorrowMut AnnotationSetSearchCall<'a, C, A> where C: BorrowMut AnnotationSetSearchCall<'a, C, A> where C: BorrowMut AnnotationSetSearchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationSetSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12676,8 +12611,8 @@ impl<'a, C, A> AnnotationSetSearchCall<'a, C, A> where C: BorrowMut AnnotationSetPatchCall<'a, C, A> where C: BorrowMut AnnotationSetPatchCall<'a, C, A> where C: BorrowMut AnnotationSetPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the annotation set to be updated. + /// /// Sets the *annotation set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the annotation set to be updated. pub fn annotation_set_id(mut self, new_value: &str) -> AnnotationSetPatchCall<'a, C, A> { self._annotation_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationSetPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -12931,8 +12865,8 @@ impl<'a, C, A> AnnotationSetPatchCall<'a, C, A> where C: BorrowMut AnnotationSetDeleteCall<'a, C, A> where C: BorrowMut AnnotationSetDeleteCall<'a, C, A> where C: BorrowMut AnnotationSetDeleteCall<'a, C, A> { self._annotation_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationSetDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13151,8 +13084,8 @@ impl<'a, C, A> AnnotationSetDeleteCall<'a, C, A> where C: BorrowMut VariantSearchCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/variants/search".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13327,22 +13260,21 @@ impl<'a, C, A> VariantSearchCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &SearchVariantsRequest) -> VariantSearchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13372,8 +13304,8 @@ impl<'a, C, A> VariantSearchCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13460,7 +13392,7 @@ impl<'a, C, A> VariantDeleteCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/variants/{variantId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{variantId}", "variantId")].iter() { @@ -13546,23 +13478,22 @@ impl<'a, C, A> VariantDeleteCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the variant to be deleted. + /// /// Sets the *variant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the variant to be deleted. pub fn variant_id(mut self, new_value: &str) -> VariantDeleteCall<'a, C, A> { self._variant_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13592,8 +13523,8 @@ impl<'a, C, A> VariantDeleteCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13777,23 +13708,22 @@ impl<'a, C, A> VariantGetCall<'a, C, A> where C: BorrowMut, A: oa } + /// The ID of the variant. + /// /// Sets the *variant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the variant. pub fn variant_id(mut self, new_value: &str) -> VariantGetCall<'a, C, A> { self._variant_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -13823,8 +13753,8 @@ impl<'a, C, A> VariantGetCall<'a, C, A> where C: BorrowMut, A: oa /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -13917,7 +13847,7 @@ impl<'a, C, A> VariantCreateCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/variants".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13997,22 +13927,21 @@ impl<'a, C, A> VariantCreateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Variant) -> VariantCreateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14042,8 +13971,8 @@ impl<'a, C, A> VariantCreateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14138,7 +14067,7 @@ impl<'a, C, A> VariantUpdateCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/genomics/v1beta2/variants/{variantId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{variantId}", "variantId")].iter() { @@ -14242,32 +14171,31 @@ impl<'a, C, A> VariantUpdateCall<'a, C, A> where C: BorrowMut, A: } + /// /// Sets the *request* property to the given value. /// /// 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: &Variant) -> VariantUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the variant to be updated. + /// /// Sets the *variant id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the variant to be updated. pub fn variant_id(mut self, new_value: &str) -> VariantUpdateCall<'a, C, A> { self._variant_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14297,8 +14225,8 @@ impl<'a, C, A> VariantUpdateCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14393,7 +14321,7 @@ impl<'a, C, A> AnnotationPatchCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/annotations/{annotationId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{annotationId}", "annotationId")].iter() { @@ -14497,32 +14425,31 @@ impl<'a, C, A> AnnotationPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Annotation) -> AnnotationPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the annotation set to be updated. + /// /// Sets the *annotation id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the annotation set to be updated. pub fn annotation_id(mut self, new_value: &str) -> AnnotationPatchCall<'a, C, A> { self._annotation_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14552,8 +14479,8 @@ impl<'a, C, A> AnnotationPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14648,7 +14575,7 @@ impl<'a, C, A> AnnotationUpdateCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/annotations/{annotationId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{annotationId}", "annotationId")].iter() { @@ -14752,32 +14679,31 @@ impl<'a, C, A> AnnotationUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Annotation) -> AnnotationUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the annotation set to be updated. + /// /// Sets the *annotation id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the annotation set to be updated. pub fn annotation_id(mut self, new_value: &str) -> AnnotationUpdateCall<'a, C, A> { self._annotation_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -14807,8 +14733,8 @@ impl<'a, C, A> AnnotationUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14901,7 +14827,7 @@ impl<'a, C, A> AnnotationSearchCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/annotations/search".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14981,22 +14907,21 @@ impl<'a, C, A> AnnotationSearchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &SearchAnnotationsRequest) -> AnnotationSearchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15026,8 +14951,8 @@ impl<'a, C, A> AnnotationSearchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15114,7 +15039,7 @@ impl<'a, C, A> AnnotationDeleteCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/annotations/{annotationId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{annotationId}", "annotationId")].iter() { @@ -15200,23 +15125,22 @@ impl<'a, C, A> AnnotationDeleteCall<'a, C, A> where C: BorrowMut, } + /// The ID of the annotation set to be deleted. + /// /// Sets the *annotation id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the annotation set to be deleted. pub fn annotation_id(mut self, new_value: &str) -> AnnotationDeleteCall<'a, C, A> { self._annotation_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15246,8 +15170,8 @@ impl<'a, C, A> AnnotationDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15431,23 +15355,22 @@ impl<'a, C, A> AnnotationGetCall<'a, C, A> where C: BorrowMut, A: } + /// The ID of the annotation set to be retrieved. + /// /// Sets the *annotation id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the annotation set to be retrieved. pub fn annotation_id(mut self, new_value: &str) -> AnnotationGetCall<'a, C, A> { self._annotation_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15477,8 +15400,8 @@ impl<'a, C, A> AnnotationGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15571,7 +15494,7 @@ impl<'a, C, A> AnnotationCreateCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/annotations".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15651,22 +15574,21 @@ impl<'a, C, A> AnnotationCreateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &Annotation) -> AnnotationCreateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15696,8 +15618,8 @@ impl<'a, C, A> AnnotationCreateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -15793,7 +15715,7 @@ impl<'a, C, A> AnnotationBatchCreateCall<'a, C, A> where C: BorrowMut AnnotationBatchCreateCall<'a, C, A> where C: BorrowMut AnnotationBatchCreateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> AnnotationBatchCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -15918,8 +15839,8 @@ impl<'a, C, A> AnnotationBatchCreateCall<'a, C, A> where C: BorrowMut ExperimentalJobCreateCall<'a, C, A> where C: BorrowMut ExperimentalJobCreateCall<'a, C, A> where C: BorrowMut ExperimentalJobCreateCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> ExperimentalJobCreateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16137,8 +16057,8 @@ impl<'a, C, A> ExperimentalJobCreateCall<'a, C, A> where C: BorrowMut VariantsetUpdateCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/variantsets/{variantSetId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{variantSetId}", "variantSetId")].iter() { @@ -16337,32 +16257,31 @@ impl<'a, C, A> VariantsetUpdateCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &VariantSet) -> VariantsetUpdateCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the variant to be updated. + /// /// Sets the *variant set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the variant to be updated. pub fn variant_set_id(mut self, new_value: &str) -> VariantsetUpdateCall<'a, C, A> { self._variant_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantsetUpdateCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16392,8 +16311,8 @@ impl<'a, C, A> VariantsetUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16592,32 +16511,31 @@ impl<'a, C, A> VariantsetExportCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &ExportVariantSetRequest) -> VariantsetExportCall<'a, C, A> { self._request = new_value.clone(); self } + /// Required. The ID of the variant set that contains variant data which should be exported. The caller must have READ access to this variant set. + /// /// Sets the *variant set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Required. The ID of the variant set that contains variant data which should be exported. The caller must have READ access to this variant set. pub fn variant_set_id(mut self, new_value: &str) -> VariantsetExportCall<'a, C, A> { self._variant_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantsetExportCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16647,8 +16565,8 @@ impl<'a, C, A> VariantsetExportCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Bigquery`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16743,7 +16661,7 @@ impl<'a, C, A> VariantsetPatchCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/variantsets/{variantSetId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{variantSetId}", "variantSetId")].iter() { @@ -16847,32 +16765,31 @@ impl<'a, C, A> VariantsetPatchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &VariantSet) -> VariantsetPatchCall<'a, C, A> { self._request = new_value.clone(); self } + /// The ID of the variant to be updated. + /// /// Sets the *variant set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the variant to be updated. pub fn variant_set_id(mut self, new_value: &str) -> VariantsetPatchCall<'a, C, A> { self._variant_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantsetPatchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -16902,8 +16819,8 @@ impl<'a, C, A> VariantsetPatchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -16998,7 +16915,7 @@ impl<'a, C, A> VariantsetSearchCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/variantsets/search".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17078,22 +16995,21 @@ impl<'a, C, A> VariantsetSearchCall<'a, C, A> where C: BorrowMut, } + /// /// Sets the *request* property to the given value. /// /// 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: &SearchVariantSetsRequest) -> VariantsetSearchCall<'a, C, A> { self._request = new_value.clone(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantsetSearchCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17123,8 +17039,8 @@ impl<'a, C, A> VariantsetSearchCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17308,23 +17224,22 @@ impl<'a, C, A> VariantsetGetCall<'a, C, A> where C: BorrowMut, A: } + /// Required. The ID of the variant set. + /// /// Sets the *variant set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Required. The ID of the variant set. pub fn variant_set_id(mut self, new_value: &str) -> VariantsetGetCall<'a, C, A> { self._variant_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantsetGetCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17354,8 +17269,8 @@ impl<'a, C, A> VariantsetGetCall<'a, C, A> where C: BorrowMut, A: /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17451,7 +17366,7 @@ impl<'a, C, A> VariantsetMergeVariantCall<'a, C, A> where C: BorrowMut VariantsetMergeVariantCall<'a, C, A> where C: BorrowMut VariantsetMergeVariantCall<'a, C, A> { self._request = new_value.clone(); self } + /// The destination variant set. + /// /// Sets the *variant set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The destination variant set. pub fn variant_set_id(mut self, new_value: &str) -> VariantsetMergeVariantCall<'a, C, A> { self._variant_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantsetMergeVariantCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17600,8 +17514,8 @@ impl<'a, C, A> VariantsetMergeVariantCall<'a, C, A> where C: BorrowMut VariantsetDeleteCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/genomics/v1beta2/variantsets/{variantSetId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{variantSetId}", "variantSetId")].iter() { @@ -17774,23 +17688,22 @@ impl<'a, C, A> VariantsetDeleteCall<'a, C, A> where C: BorrowMut, } + /// The ID of the variant set to be deleted. + /// /// Sets the *variant set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// The ID of the variant set to be deleted. pub fn variant_set_id(mut self, new_value: &str) -> VariantsetDeleteCall<'a, C, A> { self._variant_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantsetDeleteCall<'a, C, A> { self._delegate = Some(new_value); self @@ -17820,8 +17733,8 @@ impl<'a, C, A> VariantsetDeleteCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// - /// Use this method to actively specify which scope should be used, instead of relying on the - /// automated algorithm which simply prefers read-only scopes over those who are not. + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -17918,7 +17831,7 @@ impl<'a, C, A> VariantsetImportVariantCall<'a, C, A> where C: BorrowMut VariantsetImportVariantCall<'a, C, A> where C: BorrowMut VariantsetImportVariantCall<'a, C, A> { self._request = new_value.clone(); self } + /// Required. The variant set to which variant data should be imported. + /// /// Sets the *variant set id* path property to the given value. /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - /// - /// Required. The variant set to which variant data should be imported. pub fn variant_set_id(mut self, new_value: &str) -> VariantsetImportVariantCall<'a, C, A> { self._variant_set_id = new_value.to_string(); self } - /// Sets the *delegate* property to the given value. - /// - /// /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// /// 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 Delegate) -> VariantsetImportVariantCall<'a, C, A> { self._delegate = Some(new_value); self @@ -18077,8 +17989,8 @@ impl<'a, C, A> VariantsetImportVariantCall<'a, C, A> where C: BorrowMut match e { - Error::HttpError(err) => println!("HTTPERROR: {:?}", err), - Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Error::MissingToken => println!("OAuth2: Missing Token"), - Error::Cancelled => println!("Operation canceled by user"), - Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_) => println!("{}", e), }, - Ok(_) => println!("Success (value doesn't print)"), + Ok(res) => println!("Success: {:?}", res), } ``` diff --git a/gen/gmail1/src/cmn.rs b/gen/gmail1/src/cmn.rs index 438fd04c89..5d9b5ebbf8 100644 --- a/gen/gmail1/src/cmn.rs +++ b/gen/gmail1/src/cmn.rs @@ -4,6 +4,7 @@ use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; +use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; @@ -217,7 +218,7 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} - +#[derive(Debug)] pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -247,6 +248,49 @@ pub enum Error { Failure(hyper::client::Response), } + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + writeln!(f, "The application's API key was not found in the configuration").ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::MissingToken => + writeln!(f, "Didn't obtain authentication token from authenticator"), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref err) => err.fmt(f), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(ref err) => err.cause(), + _ => None + } + } +} + /// A universal result type used as return for all calls. pub type Result = std::result::Result; diff --git a/gen/gmail1/src/lib.rs b/gen/gmail1/src/lib.rs index dbb49bf6d1..f1aa90b2ae 100644 --- a/gen/gmail1/src/lib.rs +++ b/gen/gmail1/src/lib.rs @@ -125,16 +125,18 @@ //! //! match result { //! Err(e) => match e { -//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Error::MissingToken => println!("OAuth2: Missing Token"), -//! Error::Cancelled => println!("Operation canceled by user"), -//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_) => println!("{}", e), //! }, -//! Ok(_) => println!("Success (value doesn't print)"), +//! Ok(res) => println!("Success: {:?}", res), //! } //! # } //! ``` @@ -323,16 +325,18 @@ impl Default for Scope { /// /// match result { /// Err(e) => match e { -/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Error::MissingToken => println!("OAuth2: Missing Token"), -/// Error::Cancelled => println!("Operation canceled by user"), -/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_) => println!("{}", e), /// }, -/// Ok(_) => println!("Success (value doesn't print)"), +/// Ok(res) => println!("Success: {:?}", res), /// } /// # } /// ``` @@ -424,7 +428,7 @@ impl ResponseResult for MessagePartBody {} /// * [threads trash users](struct.UserThreadTrashCall.html) (response) /// * [threads modify users](struct.UserThreadModifyCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Thread { /// A short part of the message text. pub snippet: String, @@ -444,7 +448,7 @@ impl ResponseResult for Thread {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HistoryMessageAdded { /// no description provided pub message: Message, @@ -507,7 +511,7 @@ impl ResponseResult for Label {} /// /// * [history list users](struct.UserHistoryListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListHistoryResponse { /// Page token to retrieve the next page of results in the list. #[serde(rename="nextPageToken")] @@ -602,7 +606,7 @@ impl RequestValue for ModifyMessageRequest {} /// /// * [drafts list users](struct.UserDraftListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListDraftsResponse { /// Token to retrieve the next page of results in the list. #[serde(rename="nextPageToken")] @@ -621,7 +625,7 @@ impl ResponseResult for ListDraftsResponse {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HistoryMessageDeleted { /// no description provided pub message: Message, @@ -634,7 +638,7 @@ impl Part for HistoryMessageDeleted {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct History { /// Labels removed from messages in this history record. #[serde(rename="labelsRemoved")] @@ -666,7 +670,7 @@ impl Part for History {} /// /// * [get profile users](struct.UserGetProfileCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Profile { /// The total number of messages in the mailbox. #[serde(rename="messagesTotal")] @@ -689,7 +693,7 @@ impl ResponseResult for Profile {} /// /// This type is not used in any activity, and only used as *part* of another schema. /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HistoryLabelAdded { /// Label IDs added to the message. #[serde(rename="labelIds")] @@ -710,7 +714,7 @@ impl Part for HistoryLabelAdded {} /// /// * [threads list users](struct.UserThreadListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListThreadsResponse { /// Page token to retrieve the next page of results in the list. #[serde(rename="nextPageToken")] @@ -756,7 +760,7 @@ impl RequestValue for ModifyThreadRequest {} /// /// * [messages list users](struct.UserMessageListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListMessagesResponse { /// Token to retrieve the next page of results in the list. #[serde(rename="nextPageToken")] @@ -780,7 +784,7 @@ impl ResponseResult for ListMessagesResponse {} /// /// * [labels list users](struct.UserLabelListCall.html) (response) /// -#[derive(Default, Clone, Debug, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListLabelsResponse { /// List of labels. pub labels: Vec